| 7028 | } |
| 7029 | |
| 7030 | GSVector2i GSState::GSPCRTCRegs::GetResolution() |
| 7031 | { |
| 7032 | GSVector2i resolution; |
| 7033 | |
| 7034 | const GSVector4i offsets = !GSConfig.PCRTCOverscan ? VideoModeOffsets[videomode] : VideoModeOffsetsOverscan[videomode]; |
| 7035 | const bool is_full_height = interlaced || (toggling_field && GSConfig.InterlaceMode != GSInterlaceMode::Off) || GSConfig.InterlaceMode == GSInterlaceMode::Off; |
| 7036 | |
| 7037 | if (!GSConfig.PCRTCOffsets) |
| 7038 | { |
| 7039 | if (PCRTCDisplays[0].enabled && PCRTCDisplays[1].enabled) |
| 7040 | { |
| 7041 | const GSVector4i combined_size = PCRTCDisplays[0].displayRect.runion(PCRTCDisplays[1].displayRect); |
| 7042 | resolution = { combined_size.width(), combined_size.height() }; |
| 7043 | } |
| 7044 | else if (PCRTCDisplays[0].enabled) |
| 7045 | { |
| 7046 | resolution = { PCRTCDisplays[0].displayRect.width(), PCRTCDisplays[0].displayRect.height() }; |
| 7047 | } |
| 7048 | else |
| 7049 | { |
| 7050 | resolution = { PCRTCDisplays[1].displayRect.width(), PCRTCDisplays[1].displayRect.height() }; |
| 7051 | } |
| 7052 | } |
| 7053 | else |
| 7054 | { |
| 7055 | const int shift = is_full_height ? 1 : 0; |
| 7056 | resolution = { offsets.x, offsets.y << shift }; |
| 7057 | } |
| 7058 | |
| 7059 | resolution.x = std::min(resolution.x, offsets.x); |
| 7060 | resolution.y = std::min(resolution.y, is_full_height ? offsets.y << 1 : offsets.y); |
| 7061 | |
| 7062 | return resolution; |
| 7063 | } |
| 7064 | |
| 7065 | GSVector4i GSState::GSPCRTCRegs::GetFramebufferRect(int display) |
| 7066 | { |
no test coverage detected