MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

Calamity
MAME Fan
Reged: 05/30/11
Posts: 56
Send PM
Re: SDL Multithreading or build issue?
12/28/14 04:20 PM


This patch seems to fix it here (Windows 7, Intel HD 3000/Nvidia GT 630M). It looks like when in fullscreen the set cursor stuff must be run in the window thread, otherwhise it causes a deadlock. Tested with -video accel -rd direct3d/opengl/opengles2, not tested in Linux though.


Code:


diff -Nru ./src/osd/sdl/window.c ./src2/osd/sdl/window.c
--- ./src/osd/sdl/window.c 2014-11-26 10:37:58.000000000 +0100
+++ ./src2/osd/sdl/window.c 2014-12-28 15:10:55.000000000 +0100
@@ -589,11 +589,15 @@

//============================================================
// sdlwindow_update_cursor_state
-// (main or window thread)
+// (window thread)
//============================================================

-static void sdlwindow_update_cursor_state(running_machine &machine, sdl_window_info *window)
+static OSDWORK_CALLBACK( sdlwindow_update_cursor_state_wt )
{
+ worker_param *wp = (worker_param *) param;
+ sdl_window_info *window = wp->window;
+ running_machine &machine = window->machine();
+
#if (USE_XINPUT)
// Hack for wii-lightguns:
// they stop working with a grabbed mouse;
@@ -652,8 +656,20 @@
}
#endif
#endif
+ return NULL;
}

+static void sdlwindow_update_cursor_state(running_machine &machine, sdl_window_info *window)
+{
+ worker_param wp;
+
+ ASSERT_MAIN_THREAD();
+
+ clear_worker_param(&wp);
+ wp.window = window;
+ wp.m_machine = &machine;
+ execute_async_wait(&sdlwindow_update_cursor_state_wt, &wp);
+}

//============================================================
// sdlwindow_video_window_create



Edited by Calamity (12/28/14 06:31 PM)







Entire thread
Subject Posted by Posted on
* SDL Multithreading or build issue? lamprey 12/20/14 02:11 AM
. * Re: SDL Multithreading or build issue? RobbbertModerator  12/20/14 06:58 AM
. * Re: SDL Multithreading or build issue? B2K24  12/20/14 02:18 AM
. * Re: SDL Multithreading or build issue? lamprey  12/20/14 02:49 AM
. * Re: SDL Multithreading or build issue? *DELETED* Anonymous  12/20/14 12:50 PM
. * Re: SDL Multithreading or build issue? B2K24  12/20/14 09:13 PM
. * Re: SDL Multithreading or build issue? B2K24  12/20/14 07:28 AM
. * Re: SDL Multithreading or build issue? lamprey  12/20/14 10:50 AM
. * Re: SDL Multithreading or build issue? R. Belmont  12/22/14 04:44 AM
. * Re: SDL Multithreading or build issue? couriersud  12/26/14 02:12 PM
. * Re: SDL Multithreading or build issue? couriersud  12/26/14 06:47 PM
. * Re: SDL Multithreading or build issue? B2K24  12/26/14 08:01 PM
. * Re: SDL Multithreading or build issue? couriersud  12/28/14 12:00 AM
. * Re: SDL Multithreading or build issue? B2K24  12/28/14 08:53 AM
. * Re: SDL Multithreading or build issue? couriersud  12/28/14 01:24 PM
. * Re: SDL Multithreading or build issue? Calamity  12/28/14 04:20 PM
. * Re: SDL Multithreading or build issue? couriersud  12/28/14 06:16 PM
. * Re: SDL Multithreading or build issue? Calamity  12/28/14 06:32 PM
. * Re: SDL Multithreading or build issue? couriersud  12/28/14 07:00 PM
. * Re: SDL Multithreading or build issue? B2K24  12/28/14 09:28 PM
. * Um, maybe he meant post the log? (nt) Traso  12/27/14 06:50 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 406 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4584