mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-19 01:40:14 +00:00

The "All Borders" crop mode was previously creating an aspect ratio that was completely incorrect when using modes outside of Auto/4:3. We now scale the aspect ratio relative to the PAL/NTSC aspect ratio to account for this, regardless of how much of a border the game configures. Overscan cropping also produced an incorrect aspect ratio outside of 4:3 mode, resulting in minor horizontal stretching. It is now correct, however, this results in black borders being added in 16:9 for most games. To remove these borders, you have two options: - Use the "Stretch to Fill" aspect ratio. This will scale the GTE aspect ratio to fill the screen. - Use the "Only Overscan Area (Aspect Uncorrected)" crop mode. This mode retains the "old" behaviour, resulting in a stretched image.
31 lines
742 B
C++
31 lines
742 B
C++
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
|
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
|
|
|
#pragma once
|
|
#include "gte_types.h"
|
|
|
|
class StateWrapper;
|
|
|
|
enum class DisplayAspectRatio : u8;
|
|
|
|
namespace GTE {
|
|
|
|
void Initialize();
|
|
void Reset();
|
|
bool DoState(StateWrapper& sw);
|
|
void SetAspectRatio(DisplayAspectRatio aspect, u32 custom_num, u32 custom_denom);
|
|
|
|
// control registers are offset by +32
|
|
u32 ReadRegister(u32 index);
|
|
void WriteRegister(u32 index, u32 value);
|
|
|
|
// use with care, direct register access
|
|
u32* GetRegisterPtr(u32 index);
|
|
|
|
void ExecuteInstruction(u32 inst_bits);
|
|
|
|
using InstructionImpl = void (*)(Instruction);
|
|
InstructionImpl GetInstructionImpl(u32 inst_bits, TickCount* ticks);
|
|
|
|
} // namespace GTE
|