trunk/src/osd/windows/d3dhlsl.c
| r20082 | r20083 | |
| 2023 | 2023 | if (hlsl_prescale_x == 0) |
| 2024 | 2024 | { |
| 2025 | 2025 | hlsl_prescale_x = 1; |
| 2026 | | while (width * xscale * hlsl_prescale_x < d3d->width) |
| 2026 | while (width * xscale * hlsl_prescale_x <= d3d->width) |
| 2027 | 2027 | { |
| 2028 | 2028 | hlsl_prescale_x++; |
| 2029 | 2029 | } |
| r20082 | r20083 | |
| 2033 | 2033 | if (hlsl_prescale_y == 0) |
| 2034 | 2034 | { |
| 2035 | 2035 | hlsl_prescale_y = 1; |
| 2036 | | while (height * yscale * hlsl_prescale_y < d3d->height) |
| 2036 | while (height * yscale * hlsl_prescale_y <= d3d->height) |
| 2037 | 2037 | { |
| 2038 | 2038 | hlsl_prescale_y++; |
| 2039 | 2039 | } |
| 2040 | 2040 | hlsl_prescale_y--; |
| 2041 | 2041 | } |
| 2042 | 2042 | |
| 2043 | hlsl_prescale_x = ((hlsl_prescale_x == 0) ? 1 : hlsl_prescale_x); |
| 2044 | hlsl_prescale_y = ((hlsl_prescale_y == 0) ? 1 : hlsl_prescale_y); |
| 2045 | |
| 2043 | 2046 | if (!add_render_target(d3d, texture, width, height, xscale * hlsl_prescale_x, yscale * hlsl_prescale_y)) |
| 2044 | 2047 | return false; |
| 2045 | 2048 | |