trunk/src/osd/windows/winmain.c
| r19970 | r19971 | |
| 338 | 338 | { WINOPTION_HLSL_INI_READ, "0", OPTION_BOOLEAN, "enable HLSL INI reading" }, |
| 339 | 339 | { WINOPTION_HLSL_INI_WRITE, "0", OPTION_BOOLEAN, "enable HLSL INI writing" }, |
| 340 | 340 | { WINOPTION_HLSL_INI_NAME, "%g", OPTION_STRING, "HLSL INI file name for this game" }, |
| 341 | | { WINOPTION_HLSL_PRESCALE_X, "2", OPTION_INTEGER, "HLSL pre-scale override factor for X" }, |
| 342 | | { WINOPTION_HLSL_PRESCALE_Y, "2", OPTION_INTEGER, "HLSL pre-scale override factor for Y" }, |
| 341 | { WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" }, |
| 342 | { WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" }, |
| 343 | 343 | { WINOPTION_HLSL_PRESET";(-1-3)", "-1", OPTION_INTEGER, "HLSL preset to use (0-3)" }, |
| 344 | 344 | { WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enable HLSL AVI writing (huge disk bandwidth suggested)" }, |
| 345 | 345 | { WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" }, |
trunk/src/osd/windows/d3dhlsl.c
| r19970 | r19971 | |
| 193 | 193 | master_enable = false; |
| 194 | 194 | prescale_size_x = 1; |
| 195 | 195 | prescale_size_y = 1; |
| 196 | | prescale_force_x = 1; |
| 197 | | prescale_force_y = 1; |
| 196 | prescale_force_x = 0; |
| 197 | prescale_force_y = 0; |
| 198 | 198 | preset = -1; |
| 199 | 199 | shadow_texture = NULL; |
| 200 | 200 | options = NULL; |
| r19970 | r19971 | |
| 1003 | 1003 | shadow_texture = texture_create(d3d, &texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32)); |
| 1004 | 1004 | } |
| 1005 | 1005 | |
| 1006 | | prescale_force_x = 1; |
| 1007 | | prescale_force_y = 1; |
| 1006 | prescale_force_x = 0; |
| 1007 | prescale_force_y = 0; |
| 1008 | 1008 | |
| 1009 | 1009 | if(!read_ini) |
| 1010 | 1010 | { |
| r19970 | r19971 | |
| 1058 | 1058 | options->yiq_scan_time = winoptions.screen_yiq_scan_time(); |
| 1059 | 1059 | options->yiq_phase_count = winoptions.screen_yiq_phase_count(); |
| 1060 | 1060 | } |
| 1061 | | if (!prescale_force_x) |
| 1062 | | { |
| 1063 | | prescale_force_x = 1; |
| 1064 | | } |
| 1065 | | if (!prescale_force_y) |
| 1066 | | { |
| 1067 | | prescale_force_y = 1; |
| 1068 | | } |
| 1061 | |
| 1069 | 1062 | g_slider_list = init_slider_list(); |
| 1070 | 1063 | |
| 1071 | 1064 | const char *fx_dir = downcast<windows_options &>(window->machine().options()).screen_post_fx_dir(); |
| r19970 | r19971 | |
| 1904 | 1897 | d3d_cache_target* cache = find_cache_target(target->screen_index, info->texinfo.width, info->texinfo.height); |
| 1905 | 1898 | if (cache == NULL) |
| 1906 | 1899 | { |
| 1907 | | if (!add_cache_target(d3d, info, width, height, xprescale * prescale_force_x, yprescale * prescale_force_y, target->screen_index)) |
| 1900 | if (!add_cache_target(d3d, info, width, height, xprescale, yprescale, target->screen_index)) |
| 1908 | 1901 | { |
| 1909 | 1902 | global_free(target); |
| 1910 | 1903 | return false; |
| r19970 | r19971 | |
| 1956 | 1949 | |
| 1957 | 1950 | d3d_info *d3d = (d3d_info *)window->drawdata; |
| 1958 | 1951 | |
| 1959 | | // Find the nearest prescale factor that is over our screen size |
| 1960 | 1952 | int hlsl_prescale_x = prescale_force_x; |
| 1961 | 1953 | int hlsl_prescale_y = prescale_force_y; |
| 1962 | 1954 | |
| 1955 | // Find the nearest prescale factor that is over our screen size |
| 1956 | if (hlsl_prescale_x == 0) |
| 1957 | { |
| 1958 | hlsl_prescale_x = 1; |
| 1959 | while (width * xscale * hlsl_prescale_x < d3d->width) |
| 1960 | { |
| 1961 | hlsl_prescale_x++; |
| 1962 | } |
| 1963 | hlsl_prescale_x--; |
| 1964 | } |
| 1965 | |
| 1966 | if (hlsl_prescale_y == 0) |
| 1967 | { |
| 1968 | hlsl_prescale_y = 1; |
| 1969 | while (height * yscale * hlsl_prescale_y < d3d->height) |
| 1970 | { |
| 1971 | hlsl_prescale_y++; |
| 1972 | } |
| 1973 | hlsl_prescale_y--; |
| 1974 | } |
| 1975 | |
| 1963 | 1976 | if (!add_render_target(d3d, texture, width, height, xscale * hlsl_prescale_x, yscale * hlsl_prescale_y)) |
| 1964 | 1977 | return false; |
| 1965 | 1978 | |