summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/windows/video.c')
-rw-r--r--src/osd/windows/video.c71
1 files changed, 64 insertions, 7 deletions
diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c
index b4eb94d6007..efe9d39db4a 100644
--- a/src/osd/windows/video.c
+++ b/src/osd/windows/video.c
@@ -297,18 +297,15 @@ static win_monitor_info *pick_monitor(windows_options &options, int index)
aspect = get_aspect(options.aspect(), options.aspect(index), TRUE);
// look for a match in the name first
- if (scrname[0] != 0)
+ if (scrname != NULL && (scrname[0] != 0))
+ {
for (monitor = win_monitor_list; monitor != NULL; monitor = monitor->m_next)
{
- int rc = 1;
-
moncount++;
-
- rc = strcmp(scrname, monitor->devicename());
-
- if (rc == 0)
+ if (strcmp(scrname, monitor->devicename()) == 0)
goto finishit;
}
+ }
// didn't find it; alternate monitors until we hit the jackpot
index %= moncount;
@@ -418,6 +415,66 @@ void windows_osd_interface::extract_video_config()
video_config.filter = options().filter();
if (video_config.prescale == 0)
video_config.prescale = 1;
+
+ #if (USE_OPENGL)
+ // default to working video please
+ video_config.forcepow2texture = options().gl_force_pow2_texture();
+ video_config.allowtexturerect = !(options().gl_no_texture_rect());
+ video_config.vbo = options().gl_vbo();
+ video_config.pbo = options().gl_pbo();
+ video_config.glsl = options().gl_glsl();
+ if ( video_config.glsl )
+ {
+ int i;
+
+ video_config.glsl_filter = options().glsl_filter();
+
+ video_config.glsl_shader_mamebm_num=0;
+
+ for(i=0; i<GLSL_SHADER_MAX; i++)
+ {
+ stemp = options().shader_mame(i);
+ if (stemp && strcmp(stemp, OSDOPTVAL_NONE) != 0 && strlen(stemp)>0)
+ {
+ video_config.glsl_shader_mamebm[i] = (char *) malloc(strlen(stemp)+1);
+ strcpy(video_config.glsl_shader_mamebm[i], stemp);
+ video_config.glsl_shader_mamebm_num++;
+ } else {
+ video_config.glsl_shader_mamebm[i] = NULL;
+ }
+ }
+
+ video_config.glsl_shader_scrn_num=0;
+
+ for(i=0; i<GLSL_SHADER_MAX; i++)
+ {
+ stemp = options().shader_screen(i);
+ if (stemp && strcmp(stemp, OSDOPTVAL_NONE) != 0 && strlen(stemp)>0)
+ {
+ video_config.glsl_shader_scrn[i] = (char *) malloc(strlen(stemp)+1);
+ strcpy(video_config.glsl_shader_scrn[i], stemp);
+ video_config.glsl_shader_scrn_num++;
+ } else {
+ video_config.glsl_shader_scrn[i] = NULL;
+ }
+ }
+ } else {
+ int i;
+ video_config.glsl_filter = 0;
+ video_config.glsl_shader_mamebm_num=0;
+ for(i=0; i<GLSL_SHADER_MAX; i++)
+ {
+ video_config.glsl_shader_mamebm[i] = NULL;
+ }
+ video_config.glsl_shader_scrn_num=0;
+ for(i=0; i<GLSL_SHADER_MAX; i++)
+ {
+ video_config.glsl_shader_scrn[i] = NULL;
+ }
+ }
+
+ #endif /* USE_OPENGL */
+
}