Previous 199869 Revisions Next

r36142 Saturday 28th February, 2015 at 12:28:23 UTC by Couriersud
Merged sdl_video_config and win_video_config
[src/osd/sdl]video.c video.h
[src/osd/windows]video.c video.h window.c

trunk/src/osd/sdl/video.c
r244653r244654
6161//  GLOBAL VARIABLES
6262//============================================================
6363
64sdl_video_config video_config;
64osd_video_config video_config;
6565
6666sdl_monitor_info *sdl_monitor_info::primary_monitor = NULL;
6767sdl_monitor_info *sdl_monitor_info::list = NULL;
trunk/src/osd/sdl/video.h
r244653r244654
5353//  TYPE DEFINITIONS
5454//============================================================
5555
56struct sdl_mode
57{
58   int                 width;
59   int                 height;
60};
61
6256class osd_dim
6357{
6458public:
r244653r244654
160154   float               m_aspect;                 // computed/configured aspect ratio of the physical device
161155};
162156
163struct sdl_video_config
157struct osd_video_config
164158{
165   // performance options
166   int                 novideo;                // don't draw, for pure CPU benchmarking
167
168159   // global configuration
169160   int                 windowed;               // start windowed?
170161   int                 prescale;                   // prescale factor
171162   int                 keepaspect;                 // keep aspect ratio
172163   int                 numscreens;             // number of screens
173   int                 centerh;
174   int                 centerv;
175164
176165   // hardware options
177166   int                 mode;           // output mode
r244653r244654
179168   int                 syncrefresh;    // sync only to refresh rate
180169   int                 switchres;      // switch resolutions
181170
182   int                 fullstretch;
171   int                 fullstretch;   // FXIME: implement in windows!
183172
184   // vector options
185   float               beamwidth;      // beam width
173   // ddraw options
174   int                 hwstretch;                  // stretch using the hardware
186175
176   // d3d, accel, opengl
177   int                 filter;                     // enable filtering
178   //int                 filter;         // enable filtering, disabled if glsl_filter>0
179
187180   // OpenGL options
188   int                 filter;         // enable filtering, disabled if glsl_filter>0
189181   int                 glsl;
190182   int                 glsl_filter;        // glsl filtering, >0 disables filter
191183   char *              glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
r244653r244654
197189   int                 allowtexturerect;   // allow GL_ARB_texture_rectangle, default: no
198190   int                 forcepow2texture;   // force power of two textures, default: no
199191
192   // dd, d3d
193   int                 triplebuf;                  // triple buffer
194
195   //============================================================
196   // SDL - options
197   //============================================================
198   int                 novideo;                // don't draw, for pure CPU benchmarking
199
200   int                 centerh;
201   int                 centerv;
202
203   // vector options
204   float               beamwidth;      // beam width
205
200206   // perftest
201207   int                 perftest;       // print out real video fps
202208
r244653r244654
211217//  GLOBAL VARIABLES
212218//============================================================
213219
214extern sdl_video_config video_config;
220extern osd_video_config video_config;
215221
216222#endif
trunk/src/osd/windows/video.c
r244653r244654
3232//  GLOBAL VARIABLES
3333//============================================================
3434
35win_video_config video_config;
35osd_video_config video_config;
3636
3737
3838
r244653r244654
170170//  winvideo_monitor_from_handle
171171//============================================================
172172
173win_monitor_info *winvideo_monitor_from_handle(HMONITOR hmonitor)
173win_monitor_info *win_monitor_info::monitor_from_handle(HMONITOR hmonitor)
174174{
175175   win_monitor_info *monitor;
176176
trunk/src/osd/windows/video.h
r244653r244654
111111   // static
112112
113113   static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data);
114   static win_monitor_info *monitor_from_handle(HMONITOR monitor);
114115
115116private:
116117   HMONITOR            m_handle;                 // handle to the monitor
r244653r244654
120121   char *              m_name;
121122};
122123
123struct win_video_config
124struct osd_video_config
124125{
125126   // global configuration
126127   int                 windowed;                   // start windowed?
127128   int                 prescale;                   // prescale factor
128129   int                 keepaspect;                 // keep aspect ratio
129130   int                 numscreens;                 // number of screens
130   render_layer_config layerconfig;                // default configuration of layers
131131
132   // per-window configuration
133   //osd_window_config   window[MAX_WINDOWS];        // configuration data per-window
134
135132   // hardware options
136133   int                 mode;                       // output mode
137134   int                 waitvsync;                  // spin until vsync
138135   int                 syncrefresh;                // sync only to refresh rate
139   int                 triplebuf;                  // triple buffer
140136   int                 switchres;                  // switch resolutions
141137
138   int                 fullstretch;   // FXIME: implement in windows!
139
142140   // ddraw options
143141   int                 hwstretch;                  // stretch using the hardware
144142
145   // d3d options
143   // d3d, accel, opengl
146144   int                 filter;                     // enable filtering
145   //int                 filter;         // enable filtering, disabled if glsl_filter>0
147146
148147   // OpenGL options
149   //int                 filter;         // enable filtering, disabled if glsl_filter>0
150148   int                 glsl;
151149   int                 glsl_filter;        // glsl filtering, >0 disables filter
152150   char *              glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap
r244653r244654
157155   int                 vbo;
158156   int                 allowtexturerect;   // allow GL_ARB_texture_rectangle, default: no
159157   int                 forcepow2texture;   // force power of two textures, default: no
160};
161158
159   // dd, d3d
160   int                 triplebuf;                  // triple buffer
162161
162   //============================================================
163   // SDL - options
164   //============================================================
165   int                 novideo;                // don't draw, for pure CPU benchmarking
163166
164//============================================================
165//  GLOBAL VARIABLES
166//============================================================
167   int                 centerh;
168   int                 centerv;
167169
168extern win_video_config video_config;
170   // vector options
171   float               beamwidth;      // beam width
169172
173   // perftest
174   int                 perftest;       // print out real video fps
170175
176   // X11 options
177   int                 restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0
178
179   // YUV options
180   int                 scale_mode;
181};
182
171183//============================================================
172//  PROTOTYPES
184//  GLOBAL VARIABLES
173185//============================================================
174186
175win_monitor_info *winvideo_monitor_from_handle(HMONITOR monitor);
187extern osd_video_config video_config;
176188
177189#endif
trunk/src/osd/windows/window.c
r244653r244654
847847         p.left = proposed->left();
848848         p.bottom = proposed->bottom();
849849         p.right = proposed->right();
850         monitor = winvideo_monitor_from_handle(MonitorFromRect(&p, MONITOR_DEFAULTTONEAREST));
850         monitor = win_monitor_info::monitor_from_handle(MonitorFromRect(&p, MONITOR_DEFAULTTONEAREST));
851851      }
852852      else
853         monitor = winvideo_monitor_from_handle(MonitorFromWindow(m_hwnd, MONITOR_DEFAULTTONEAREST));
853         monitor = win_monitor_info::monitor_from_handle(MonitorFromWindow(m_hwnd, MONITOR_DEFAULTTONEAREST));
854854   }
855855
856856   // in full screen, just use the configured monitor


Previous 199869 Revisions Next


© 1997-2024 The MAME Team