From b414a032e6630205e36c67c2e334902973ade6f6 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 28 Feb 2015 13:28:23 +0100 Subject: Merged sdl_video_config and win_video_config --- src/osd/sdl/video.c | 2 +- src/osd/sdl/video.h | 40 +++++++++++++++++++++++----------------- src/osd/windows/video.c | 4 ++-- src/osd/windows/video.h | 42 +++++++++++++++++++++++++++--------------- src/osd/windows/window.c | 4 ++-- 5 files changed, 55 insertions(+), 37 deletions(-) diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c index 28ec4344b7e..d0cab0678c7 100644 --- a/src/osd/sdl/video.c +++ b/src/osd/sdl/video.c @@ -61,7 +61,7 @@ // GLOBAL VARIABLES //============================================================ -sdl_video_config video_config; +osd_video_config video_config; sdl_monitor_info *sdl_monitor_info::primary_monitor = NULL; sdl_monitor_info *sdl_monitor_info::list = NULL; diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index 9286ead12ec..d8d521284b4 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -53,12 +53,6 @@ enum { // TYPE DEFINITIONS //============================================================ -struct sdl_mode -{ - int width; - int height; -}; - class osd_dim { public: @@ -160,18 +154,13 @@ private: float m_aspect; // computed/configured aspect ratio of the physical device }; -struct sdl_video_config +struct osd_video_config { - // performance options - int novideo; // don't draw, for pure CPU benchmarking - // global configuration int windowed; // start windowed? int prescale; // prescale factor int keepaspect; // keep aspect ratio int numscreens; // number of screens - int centerh; - int centerv; // hardware options int mode; // output mode @@ -179,13 +168,16 @@ struct sdl_video_config int syncrefresh; // sync only to refresh rate int switchres; // switch resolutions - int fullstretch; + int fullstretch; // FXIME: implement in windows! - // vector options - float beamwidth; // beam width + // ddraw options + int hwstretch; // stretch using the hardware + + // d3d, accel, opengl + int filter; // enable filtering + //int filter; // enable filtering, disabled if glsl_filter>0 // OpenGL options - int filter; // enable filtering, disabled if glsl_filter>0 int glsl; int glsl_filter; // glsl filtering, >0 disables filter char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap @@ -197,6 +189,20 @@ struct sdl_video_config int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no int forcepow2texture; // force power of two textures, default: no + // dd, d3d + int triplebuf; // triple buffer + + //============================================================ + // SDL - options + //============================================================ + int novideo; // don't draw, for pure CPU benchmarking + + int centerh; + int centerv; + + // vector options + float beamwidth; // beam width + // perftest int perftest; // print out real video fps @@ -211,6 +217,6 @@ struct sdl_video_config // GLOBAL VARIABLES //============================================================ -extern sdl_video_config video_config; +extern osd_video_config video_config; #endif diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c index 44574699caa..b4eb94d6007 100644 --- a/src/osd/windows/video.c +++ b/src/osd/windows/video.c @@ -32,7 +32,7 @@ // GLOBAL VARIABLES //============================================================ -win_video_config video_config; +osd_video_config video_config; @@ -170,7 +170,7 @@ float win_monitor_info::aspect() // winvideo_monitor_from_handle //============================================================ -win_monitor_info *winvideo_monitor_from_handle(HMONITOR hmonitor) +win_monitor_info *win_monitor_info::monitor_from_handle(HMONITOR hmonitor) { win_monitor_info *monitor; diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index e82b6f41261..109cf1b409e 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -111,6 +111,7 @@ public: // static static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data); + static win_monitor_info *monitor_from_handle(HMONITOR monitor); private: HMONITOR m_handle; // handle to the monitor @@ -120,33 +121,30 @@ private: char * m_name; }; -struct win_video_config +struct osd_video_config { // global configuration int windowed; // start windowed? int prescale; // prescale factor int keepaspect; // keep aspect ratio int numscreens; // number of screens - render_layer_config layerconfig; // default configuration of layers - - // per-window configuration - //osd_window_config window[MAX_WINDOWS]; // configuration data per-window // hardware options int mode; // output mode int waitvsync; // spin until vsync int syncrefresh; // sync only to refresh rate - int triplebuf; // triple buffer int switchres; // switch resolutions + int fullstretch; // FXIME: implement in windows! + // ddraw options int hwstretch; // stretch using the hardware - // d3d options + // d3d, accel, opengl int filter; // enable filtering + //int filter; // enable filtering, disabled if glsl_filter>0 // OpenGL options - //int filter; // enable filtering, disabled if glsl_filter>0 int glsl; int glsl_filter; // glsl filtering, >0 disables filter char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap @@ -157,21 +155,35 @@ struct win_video_config int vbo; int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no int forcepow2texture; // force power of two textures, default: no -}; + // dd, d3d + int triplebuf; // triple buffer + + //============================================================ + // SDL - options + //============================================================ + int novideo; // don't draw, for pure CPU benchmarking + int centerh; + int centerv; -//============================================================ -// GLOBAL VARIABLES -//============================================================ + // vector options + float beamwidth; // beam width -extern win_video_config video_config; + // perftest + int perftest; // print out real video fps + // X11 options + int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0 + + // YUV options + int scale_mode; +}; //============================================================ -// PROTOTYPES +// GLOBAL VARIABLES //============================================================ -win_monitor_info *winvideo_monitor_from_handle(HMONITOR monitor); +extern osd_video_config video_config; #endif diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index a53290a9a2c..d634d7e0448 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -847,10 +847,10 @@ win_monitor_info *win_window_info::winwindow_video_window_monitor(const osd_rect p.left = proposed->left(); p.bottom = proposed->bottom(); p.right = proposed->right(); - monitor = winvideo_monitor_from_handle(MonitorFromRect(&p, MONITOR_DEFAULTTONEAREST)); + monitor = win_monitor_info::monitor_from_handle(MonitorFromRect(&p, MONITOR_DEFAULTTONEAREST)); } else - monitor = winvideo_monitor_from_handle(MonitorFromWindow(m_hwnd, MONITOR_DEFAULTTONEAREST)); + monitor = win_monitor_info::monitor_from_handle(MonitorFromWindow(m_hwnd, MONITOR_DEFAULTTONEAREST)); } // in full screen, just use the configured monitor -- cgit v1.2.3