diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c index 9cb4a3b9ccb27ae9ab82b0698299b641e76f9e23..0690c917e2a8f231d58a53ba4d09c394d54da5ca 100644 --- a/src/conio/sdl_con.c +++ b/src/conio/sdl_con.c @@ -370,19 +370,10 @@ sdl_get_bounds(int *w, int *h) return true; } -static int sdl_init_mode(int mode, bool init) +static int sdl_init_mode(int mode) { int w, h; - if (mode != CIOLIB_MODE_CUSTOM) { - assert_rwlock_rdlock(&vstatlock); - if (mode == vstat.mode && !init) { - assert_rwlock_unlock(&vstatlock); - return 0; - } - assert_rwlock_unlock(&vstatlock); - } - sdl_user_func(SDL_USEREVENT_FLUSH); assert_pthread_mutex_lock(&win_mutex); @@ -434,7 +425,7 @@ int sdl_init(int mode) _beginthread(sdl_video_event_thread, 0, NULL); #endif sdl_user_func_ret(SDL_USEREVENT_INIT); - sdl_init_mode(ciolib_initial_mode, true); + sdl_init_mode(ciolib_initial_mode); if(sdl_init_good) { cio_api.mode=fullscreen?CIOLIB_MODE_SDL_FULLSCREEN:CIOLIB_MODE_SDL; @@ -568,7 +559,7 @@ int sdl_getch(void) /* Called from main thread only */ void sdl_textmode(int mode) { - sdl_init_mode(mode, false); + sdl_init_mode(mode); } /* Called from main thread only (Passes Event) */ diff --git a/src/conio/win32gdi.c b/src/conio/win32gdi.c index 8affa76ad0d0cd4d6f7a10c9842c381b22a4f608..1427cb74597cc1f85cffcad15013b96d24865f18 100644 --- a/src/conio/win32gdi.c +++ b/src/conio/win32gdi.c @@ -1090,15 +1090,6 @@ gdi_textmode(int mode) { int mw, mh; - if (mode != CIOLIB_MODE_CUSTOM) { - assert_rwlock_rdlock(&vstatlock); - if (mode == vstat.mode) { - assert_rwlock_unlock(&vstatlock); - return; - } - assert_rwlock_unlock(&vstatlock); - } - assert_rwlock_wrlock(&vstatlock); get_monitor_size_pos(&mw, &mh, NULL, NULL); UnadjustWindowSize(&mw, &mh); diff --git a/src/syncterm/CHANGES b/src/syncterm/CHANGES index 1343c080a6ac6fbfca2835b3964217160165e732..be9527d813c45b5208ccbb285ad94509024443ab 100644 --- a/src/syncterm/CHANGES +++ b/src/syncterm/CHANGES @@ -10,6 +10,7 @@ Pass control key combinations in BBC Micro mode Add support for DECSC/DECRC control codes Fix crash when first ANSI music note played is in background Fix binary mode tracking, which could cause issues after transfers +Fix SDL and GDI issue with textmode() when font is changed Version 1.6 ------------