summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-20 10:21:27 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-20 10:21:27 +0200
commita314888cf6e3b169ddee2a8fb42a4da3a5de0f37 (patch)
treecd6746c8ec6c921178d5acaeda862713da99ac14
parent9b646b992afea6551bda791153dbfc3f0350666a (diff)
SDL cleanup (nw)
-rw-r--r--src/osd/modules/input/input_sdlcommon.h1
-rw-r--r--src/osd/sdl/osdsdl.h15
-rw-r--r--src/osd/sdl/sdlmain.cpp16
-rw-r--r--src/osd/sdl/window.cpp15
-rw-r--r--src/osd/sdl/window.h5
5 files changed, 5 insertions, 47 deletions
diff --git a/src/osd/modules/input/input_sdlcommon.h b/src/osd/modules/input/input_sdlcommon.h
index 458b90be7ba..feecf23f975 100644
--- a/src/osd/modules/input/input_sdlcommon.h
+++ b/src/osd/modules/input/input_sdlcommon.h
@@ -113,7 +113,6 @@ public:
class sdl_window_info;
-// REVIEW: Do we need to handle SDLMAME_EVENTS_IN_WORKER_THREAD eventually?
class sdl_event_manager : public event_manager_t<sdl_event_subscriber>
{
private:
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index d7d4a1a4a3c..c45c807efd5 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -8,21 +8,6 @@
#include "modules/font/font_module.h"
//============================================================
-// System dependent defines
-//============================================================
-
-
-#if defined(SDLMAME_WIN32)
- #define SDLMAME_EVENTS_IN_WORKER_THREAD (0)
- #define SDLMAME_INIT_IN_WORKER_THREAD (0)
- #define SDL13_COMBINE_RESIZE (0) //(1) no longer needed
-#else
- #define SDLMAME_EVENTS_IN_WORKER_THREAD (0)
- #define SDLMAME_INIT_IN_WORKER_THREAD (0)
- #define SDL13_COMBINE_RESIZE (0)
-#endif
-
-//============================================================
// Defines
//============================================================
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 8f0bc4c5950..218c4bd89d4 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -274,10 +274,7 @@ void sdl_osd_interface::osd_exit()
{
osd_common_t::osd_exit();
- if (!SDLMAME_INIT_IN_WORKER_THREAD)
- {
- SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER );
- }
+ SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
//============================================================
@@ -491,14 +488,11 @@ void sdl_osd_interface::init(running_machine &machine)
/* Initialize SDL */
- if (!SDLMAME_INIT_IN_WORKER_THREAD)
- {
- if (SDL_InitSubSystem(SDL_INIT_VIDEO)) {
- osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
- exit(-1);
- }
- osd_sdl_info();
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO)) {
+ osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
+ exit(-1);
}
+ osd_sdl_info();
defines_verbose();
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 0924bb5bb19..ea3843515f7 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -181,15 +181,6 @@ static inline void execute_async_wait(osd_work_callback callback, const worker_p
static OSDWORK_CALLBACK(sdlwindow_thread_id)
{
window_threadid = SDL_ThreadID();
-
- if (SDLMAME_INIT_IN_WORKER_THREAD)
- {
- if (SDL_InitSubSystem(SDL_INIT_VIDEO))
- {
- osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError());
- exit(-1);
- }
- }
return nullptr;
}
@@ -310,9 +301,6 @@ void sdl_osd_interface::build_slider_list()
static OSDWORK_CALLBACK( sdlwindow_exit_wt )
{
- if (SDLMAME_INIT_IN_WORKER_THREAD)
- SDL_Quit();
-
if (param)
osd_free(param);
return nullptr;
@@ -1357,9 +1345,6 @@ sdl_window_info::sdl_window_info(running_machine &a_machine, int index, osd_moni
const osd_window_config *config)
: osd_window(), m_next(NULL),
// Following three are used by input code to defer resizes
- m_resize_width(0),
- m_resize_height(0),
- m_last_resize(0),
m_minimum_dim(0,0),
m_windowed_dim(0,0),
m_rendered_event(0, 1), m_target(0),
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index 0a8abf24c10..14ee6e3c19a 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -70,11 +70,6 @@ public:
// Pointer to next window
sdl_window_info * m_next;
- // These are used in combine resizing events ... #if SDL13_COMBINE_RESIZE
- int m_resize_width;
- int m_resize_height;
- osd_ticks_t m_last_resize;
-
private:
// window handle and info
char m_title[256];