Skip to content

Commit

Permalink
Fix thread management also in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
amadvance committed Feb 6, 2024
1 parent 3f25b4c commit 7b1de3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions advance/osd/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,8 @@ static adv_error vidmode_update(struct advance_video_context* context, adv_mode*

void advance_thread_vidmode_done(struct advance_video_context* context, adv_bool restore)
{
#ifdef USE_SMP
/* in Windows using the thread makes the keyboard not working */
#if defined(USE_SMP) && defined(__linux__)
context->state.thread_arg_bool = restore;

advance_video_thread_signal(context, THREAD_DONE);
Expand All @@ -898,7 +899,8 @@ void advance_thread_vidmode_done(struct advance_video_context* context, adv_bool

adv_error advance_thread_vidmode_update(struct advance_video_context* context, adv_mode* mode, adv_bool ignore_input)
{
#ifdef USE_SMP
/* in Windows using the thread makes the keyboard not working */
#if defined(USE_SMP) && defined(__linux__)
context->state.thread_arg_mode = mode;
context->state.thread_arg_bool = ignore_input;

Expand Down
1 change: 1 addition & 0 deletions advance/sdl/vsdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,7 @@ adv_error sdl_scroll(unsigned offset, adv_bool waitvsync)
#endif
) {
log_std(("video:sdl: recompute renderer for thread/vsync change\n"));
sdl_state.overlay_vsync = waitvsync;
sdl_overlay_set();
}

Expand Down

0 comments on commit 7b1de3d

Please sign in to comment.