Fix compilation for non-Qt builds

This commit is contained in:
Cacodemon345
2022-07-07 15:09:13 +06:00
parent 2bd4c67577
commit 0ce1a8edfe
5 changed files with 15 additions and 9 deletions

View File

@@ -495,6 +495,9 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
return(1);
}
extern int gfxcard_2;
gfxcard_2 = 0;
/* Create console window. */
if (force_debug) {
CreateConsole(1);
@@ -557,7 +560,7 @@ main_thread(void *param)
plat_resize(fixed_size_x, fixed_size_y);
else
plat_resize(scrnsz_x, scrnsz_y);
atomic_store(&doresize_monitors[0]);
atomic_store(&doresize_monitors[0], 0);
}
}
@@ -1190,7 +1193,7 @@ plat_setfullscreen(int on)
video_fullscreen &= 1;
video_force_resize_set(1);
if (!(on & 1))
atomic_flag_clear(&doresize);
atomic_store(&doresize_monitors[0], 1);
win_mouse_init();

View File

@@ -876,9 +876,9 @@ static void opengl_blit(int x, int y, int w, int h, int monitor_index)
int row;
if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (thread == NULL) ||
atomic_flag_test_and_set(&blit_info[write_pos].in_use))
atomic_flag_test_and_set(&blit_info[write_pos].in_use) || monitor_index >= 1)
{
video_blit_complete();
video_blit_complete_monitor(monitor_index);
return;
}

View File

@@ -234,8 +234,8 @@ sdl_blit(int x, int y, int w, int h, int monitor_index)
SDL_Rect r_src;
int ret;
if (!sdl_enabled || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) {
video_blit_complete();
if (!sdl_enabled || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL) || monitor_index >= 1) {
video_blit_complete_monitor(monitor_index);
return;
}