summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/osdwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/osdwindow.h')
-rw-r--r--src/osd/modules/osdwindow.h102
1 files changed, 95 insertions, 7 deletions
diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h
index 0cca8d27d30..60d2cccc700 100644
--- a/src/osd/modules/osdwindow.h
+++ b/src/osd/modules/osdwindow.h
@@ -11,11 +11,20 @@
#include "emu.h"
#include "ui/ui.h"
+#include "ui/menu.h"
#include "osdhelper.h"
+// standard windows headers
+#ifdef OSD_WINDOWS
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <windowsx.h>
+#include <mmsystem.h>
+#endif
+
#ifdef OSD_SDL
-// standard SDL headers
-#include "sdlinc.h"
+// forward declaration
+struct SDL_Window;
#endif
//============================================================
@@ -132,11 +141,11 @@ public:
virtual osd_dim get_size() = 0;
-#ifdef OSD_SDL
virtual osd_monitor_info *monitor() const = 0;
+
+#ifdef OSD_SDL
virtual SDL_Window *sdl_window() = 0;
#else
- virtual osd_monitor_info *monitor() const = 0;
virtual bool win_has_menu() = 0;
// FIXME: cann we replace winwindow_video_window_monitor(NULL) with monitor() ?
virtual osd_monitor_info *winwindow_video_window_monitor(const osd_rect *proposed) = 0;
@@ -189,21 +198,23 @@ public:
virtual int create() = 0;
virtual render_primitive_list *get_primitives() = 0;
- virtual slider_state* get_slider_list() { return nullptr; }
+ virtual std::vector<ui_menu_item> get_slider_list() { return m_sliders; }
virtual int draw(const int update) = 0;
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) { return 0; };
virtual void save() { };
virtual void record() { };
virtual void toggle_fsfx() { };
virtual bool sliders_dirty() { return m_sliders_dirty; }
- virtual bool multi_window_sliders() { return false; }
static osd_renderer* make_for_type(int mode, osd_window *window, int extra_flags = FLAG_NONE);
protected:
+ virtual void build_slider_list() { }
+
/* Internal flags */
static const int FI_CHANGED = 0x010000;
- bool m_sliders_dirty;
+ bool m_sliders_dirty;
+ std::vector<ui_menu_item> m_sliders;
private:
osd_window *m_window;
@@ -211,4 +222,81 @@ private:
};
+
+//============================================================
+// CONSTANTS
+//============================================================
+
+#define MAX_VIDEO_WINDOWS (4)
+
+#define VIDEO_SCALE_MODE_NONE (0)
+
+#define GLSL_SHADER_MAX 10
+
+
+//============================================================
+// TYPE DEFINITIONS
+//============================================================
+
+struct osd_video_config
+{
+ // global configuration
+ int windowed; // start windowed?
+ int prescale; // prescale factor
+ int keepaspect; // keep aspect ratio
+ int numscreens; // number of screens
+ int fullstretch; // fractional stretch
+
+ // hardware options
+ int mode; // output mode
+ int waitvsync; // spin until vsync
+ int syncrefresh; // sync only to refresh rate
+ int switchres; // switch resolutions
+
+ // d3d, accel, opengl
+ int filter; // enable filtering
+ //int filter; // enable filtering, disabled if glsl_filter>0
+
+ // OpenGL options
+ int glsl;
+ int glsl_filter; // glsl filtering, >0 disables filter
+ char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
+ int glsl_shader_mamebm_num; // custom glsl shader set number, mame bitmap
+ char * glsl_shader_scrn[GLSL_SHADER_MAX]; // custom glsl shader set, screen bitmap
+ int glsl_shader_scrn_num; // custom glsl shader number, screen bitmap
+ int pbo;
+ 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;
+
+ // vector options
+ float beamwidth; // beam width
+
+ // perftest
+ int perftest; // print out real video fps
+
+ // X11 options
+ int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0
+
+ // YUV options
+ int scale_mode;
+};
+
+//============================================================
+// GLOBAL VARIABLES
+//============================================================
+
+extern osd_video_config video_config;
+
#endif /* __OSDWINDOW__ */