Commit 6c966c51 authored by M4xw's avatar M4xw 🍗
Browse files

Merge branch 'vid_mode_switch' into 'develop'

Allow video changes and changed to mutexLock (seems to work just fine)

See merge request !54
parents 053db592 af78344c
......@@ -38,8 +38,7 @@
static inline void lockMutex(Mutex* mtx)
{
while (!mutexTryLock(mtx))
svcSleepThread(3);
mutexLock(mtx);
}
typedef struct
......
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment