trunk/src/osd/sdl/video.h
| r244653 | r244654 | |
| 53 | 53 | // TYPE DEFINITIONS |
| 54 | 54 | //============================================================ |
| 55 | 55 | |
| 56 | | struct sdl_mode |
| 57 | | { |
| 58 | | int width; |
| 59 | | int height; |
| 60 | | }; |
| 61 | | |
| 62 | 56 | class osd_dim |
| 63 | 57 | { |
| 64 | 58 | public: |
| r244653 | r244654 | |
| 160 | 154 | float m_aspect; // computed/configured aspect ratio of the physical device |
| 161 | 155 | }; |
| 162 | 156 | |
| 163 | | struct sdl_video_config |
| 157 | struct osd_video_config |
| 164 | 158 | { |
| 165 | | // performance options |
| 166 | | int novideo; // don't draw, for pure CPU benchmarking |
| 167 | | |
| 168 | 159 | // global configuration |
| 169 | 160 | int windowed; // start windowed? |
| 170 | 161 | int prescale; // prescale factor |
| 171 | 162 | int keepaspect; // keep aspect ratio |
| 172 | 163 | int numscreens; // number of screens |
| 173 | | int centerh; |
| 174 | | int centerv; |
| 175 | 164 | |
| 176 | 165 | // hardware options |
| 177 | 166 | int mode; // output mode |
| r244653 | r244654 | |
| 179 | 168 | int syncrefresh; // sync only to refresh rate |
| 180 | 169 | int switchres; // switch resolutions |
| 181 | 170 | |
| 182 | | int fullstretch; |
| 171 | int fullstretch; // FXIME: implement in windows! |
| 183 | 172 | |
| 184 | | // vector options |
| 185 | | float beamwidth; // beam width |
| 173 | // ddraw options |
| 174 | int hwstretch; // stretch using the hardware |
| 186 | 175 | |
| 176 | // d3d, accel, opengl |
| 177 | int filter; // enable filtering |
| 178 | //int filter; // enable filtering, disabled if glsl_filter>0 |
| 179 | |
| 187 | 180 | // OpenGL options |
| 188 | | int filter; // enable filtering, disabled if glsl_filter>0 |
| 189 | 181 | int glsl; |
| 190 | 182 | int glsl_filter; // glsl filtering, >0 disables filter |
| 191 | 183 | char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap |
| r244653 | r244654 | |
| 197 | 189 | int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no |
| 198 | 190 | int forcepow2texture; // force power of two textures, default: no |
| 199 | 191 | |
| 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 | |
| 200 | 206 | // perftest |
| 201 | 207 | int perftest; // print out real video fps |
| 202 | 208 | |
| r244653 | r244654 | |
| 211 | 217 | // GLOBAL VARIABLES |
| 212 | 218 | //============================================================ |
| 213 | 219 | |
| 214 | | extern sdl_video_config video_config; |
| 220 | extern osd_video_config video_config; |
| 215 | 221 | |
| 216 | 222 | #endif |
trunk/src/osd/windows/video.h
| r244653 | r244654 | |
| 111 | 111 | // static |
| 112 | 112 | |
| 113 | 113 | static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data); |
| 114 | static win_monitor_info *monitor_from_handle(HMONITOR monitor); |
| 114 | 115 | |
| 115 | 116 | private: |
| 116 | 117 | HMONITOR m_handle; // handle to the monitor |
| r244653 | r244654 | |
| 120 | 121 | char * m_name; |
| 121 | 122 | }; |
| 122 | 123 | |
| 123 | | struct win_video_config |
| 124 | struct osd_video_config |
| 124 | 125 | { |
| 125 | 126 | // global configuration |
| 126 | 127 | int windowed; // start windowed? |
| 127 | 128 | int prescale; // prescale factor |
| 128 | 129 | int keepaspect; // keep aspect ratio |
| 129 | 130 | int numscreens; // number of screens |
| 130 | | render_layer_config layerconfig; // default configuration of layers |
| 131 | 131 | |
| 132 | | // per-window configuration |
| 133 | | //osd_window_config window[MAX_WINDOWS]; // configuration data per-window |
| 134 | | |
| 135 | 132 | // hardware options |
| 136 | 133 | int mode; // output mode |
| 137 | 134 | int waitvsync; // spin until vsync |
| 138 | 135 | int syncrefresh; // sync only to refresh rate |
| 139 | | int triplebuf; // triple buffer |
| 140 | 136 | int switchres; // switch resolutions |
| 141 | 137 | |
| 138 | int fullstretch; // FXIME: implement in windows! |
| 139 | |
| 142 | 140 | // ddraw options |
| 143 | 141 | int hwstretch; // stretch using the hardware |
| 144 | 142 | |
| 145 | | // d3d options |
| 143 | // d3d, accel, opengl |
| 146 | 144 | int filter; // enable filtering |
| 145 | //int filter; // enable filtering, disabled if glsl_filter>0 |
| 147 | 146 | |
| 148 | 147 | // OpenGL options |
| 149 | | //int filter; // enable filtering, disabled if glsl_filter>0 |
| 150 | 148 | int glsl; |
| 151 | 149 | int glsl_filter; // glsl filtering, >0 disables filter |
| 152 | 150 | char * glsl_shader_mamebm[GLSL_SHADER_MAX]; // custom glsl shader set, mame bitmap |
| r244653 | r244654 | |
| 157 | 155 | int vbo; |
| 158 | 156 | int allowtexturerect; // allow GL_ARB_texture_rectangle, default: no |
| 159 | 157 | int forcepow2texture; // force power of two textures, default: no |
| 160 | | }; |
| 161 | 158 | |
| 159 | // dd, d3d |
| 160 | int triplebuf; // triple buffer |
| 162 | 161 | |
| 162 | //============================================================ |
| 163 | // SDL - options |
| 164 | //============================================================ |
| 165 | int novideo; // don't draw, for pure CPU benchmarking |
| 163 | 166 | |
| 164 | | //============================================================ |
| 165 | | // GLOBAL VARIABLES |
| 166 | | //============================================================ |
| 167 | int centerh; |
| 168 | int centerv; |
| 167 | 169 | |
| 168 | | extern win_video_config video_config; |
| 170 | // vector options |
| 171 | float beamwidth; // beam width |
| 169 | 172 | |
| 173 | // perftest |
| 174 | int perftest; // print out real video fps |
| 170 | 175 | |
| 176 | // X11 options |
| 177 | int restrictonemonitor; // in fullscreen, confine to Xinerama monitor 0 |
| 178 | |
| 179 | // YUV options |
| 180 | int scale_mode; |
| 181 | }; |
| 182 | |
| 171 | 183 | //============================================================ |
| 172 | | // PROTOTYPES |
| 184 | // GLOBAL VARIABLES |
| 173 | 185 | //============================================================ |
| 174 | 186 | |
| 175 | | win_monitor_info *winvideo_monitor_from_handle(HMONITOR monitor); |
| 187 | extern osd_video_config video_config; |
| 176 | 188 | |
| 177 | 189 | #endif |
trunk/src/osd/windows/window.c
| r244653 | r244654 | |
| 847 | 847 | p.left = proposed->left(); |
| 848 | 848 | p.bottom = proposed->bottom(); |
| 849 | 849 | 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)); |
| 851 | 851 | } |
| 852 | 852 | 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)); |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | 856 | // in full screen, just use the configured monitor |