diff --git a/audio/drivers/switch_thread_audio.c b/audio/drivers/switch_thread_audio.c index cd4179e890cea91a1ff311be353bf4bfe6f6b7f2..5457cd3bcd65e672e3211c2c13301c83d90eb00e 100644 --- a/audio/drivers/switch_thread_audio.c +++ b/audio/drivers/switch_thread_audio.c @@ -38,8 +38,7 @@ static inline void lockMutex(Mutex* mtx) { - while (!mutexTryLock(mtx)) - svcSleepThread(3); + mutexLock(mtx); } typedef struct diff --git a/gfx/drivers/switch_gfx.c b/gfx/drivers/switch_gfx.c index a8f255be0a0fe949b93585ac5f234861de9895b7..a0fc4430f9b61b0c1eac070162eb60c8545d0aa4 100644 --- a/gfx/drivers/switch_gfx.c +++ b/gfx/drivers/switch_gfx.c @@ -332,9 +332,9 @@ static bool switch_frame(void *data, const void *frame, return true; } - if (sw->should_resize) + if (sw->should_resize || width != sw->last_width || height != sw->last_height) { - printf("[Video] Requesting new size\n"); + printf("[Video] Requesting new size: width %i height %i\n", width, height); printf("[Video] fw: %i fh: %i w: %i h: %i x: %i y: %i\n", sw->vp.full_width, sw->vp.full_height, sw->vp.width, sw->vp.height, sw->vp.x, sw->vp.y); switch_update_viewport(sw, video_info); printf("[Video] fw: %i fh: %i w: %i h: %i x: %i y: %i\n", sw->vp.full_width, sw->vp.full_height, sw->vp.width, sw->vp.height, sw->vp.x, sw->vp.y); diff --git a/libretro-common/rthreads/switch_pthread.h b/libretro-common/rthreads/switch_pthread.h index 21a63505e1b06b0e2384b22531ead5afdf2e1ff1..0f13e5ad933a3ef92df192cccc93fb5ccb58b3f3 100644 --- a/libretro-common/rthreads/switch_pthread.h +++ b/libretro-common/rthreads/switch_pthread.h @@ -159,8 +159,7 @@ static INLINE int pthread_mutex_destroy(pthread_mutex_t *mutex) static INLINE int pthread_mutex_lock(pthread_mutex_t *mutex) { - while (!mutexTryLock(mutex)) - svcSleepThread(3); + mutexLock(mutex); return 0; }