fix hires mode in menus and smack videos

This commit is contained in:
Dethrace Labs 2023-04-21 12:56:44 +12:00
parent 6c0b26cc8d
commit d3fe4ed5d9
2 changed files with 5 additions and 4 deletions

View File

@ -388,8 +388,9 @@ void Win32CreateWindow() {
// int height = GetSystemMetrics(SM_CYSCREEN);
// int width = GetSystemMetrics(SM_CXSCREEN);
int height = 200;
int width = 320;
int width = gGraf_specs[gGraf_spec_index].total_width;
int height = gGraf_specs[gGraf_spec_index].total_height;
// WS_VISIBLE | WS_POPUP
gWin32_hwnd = CreateWindowExA_(0, "CarmageddonClass", "Carmageddon", 0x90000000, 0, 0, width, height, 0, NULL, NULL, NULL);
SSDXGetWindowRect(gWin32_hwnd);

View File

@ -67,8 +67,8 @@ void SmackToBuffer(Smack* smack, uint32_t left, uint32_t top, uint32_t pitch, ui
char* char_buf = buf;
const unsigned char* frame = smk_get_video(smack->smk_handle);
for (i = 0; i < destheight; i++) {
memcpy(&char_buf[(i * pitch)], &frame[i * pitch], pitch);
for (i = 0; i < smack->Height; i++) {
memcpy(&char_buf[(i * pitch)], &frame[i * smack->Width], smack->Width);
}
}