mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-23 20:32:29 +00:00
lock X11 display better around update_display_window_vosf()
This commit is contained in:
parent
e85f4397c8
commit
ce67261af4
@ -368,7 +368,6 @@ There are two cases to check:
|
|||||||
static inline void update_display_window_vosf(VIDEO_DRV_INIT)
|
static inline void update_display_window_vosf(VIDEO_DRV_INIT)
|
||||||
{
|
{
|
||||||
VIDEO_MODE_INIT;
|
VIDEO_MODE_INIT;
|
||||||
XDisplayLock();
|
|
||||||
|
|
||||||
int page = 0;
|
int page = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -429,8 +428,6 @@ static inline void update_display_window_vosf(VIDEO_DRV_INIT)
|
|||||||
XPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height);
|
XPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
XDisplayUnlock();
|
|
||||||
mainBuffer.dirty = false;
|
mainBuffer.dirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2480,10 +2480,12 @@ static void video_refresh_window_vosf(void)
|
|||||||
if (++tick_counter >= frame_skip) {
|
if (++tick_counter >= frame_skip) {
|
||||||
tick_counter = 0;
|
tick_counter = 0;
|
||||||
if (mainBuffer.dirty) {
|
if (mainBuffer.dirty) {
|
||||||
|
XDisplayLock();
|
||||||
LOCK_VOSF;
|
LOCK_VOSF;
|
||||||
update_display_window_vosf(static_cast<driver_window *>(drv));
|
update_display_window_vosf(static_cast<driver_window *>(drv));
|
||||||
UNLOCK_VOSF;
|
UNLOCK_VOSF;
|
||||||
XSync(x_display, false); // Let the server catch up
|
XSync(x_display, false); // Let the server catch up
|
||||||
|
XDisplayUnlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user