mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
PSF: move resolution flags to enum
This commit is contained in:
parent
60d80fd5fc
commit
4f03cf7e1e
4 changed files with 30 additions and 15 deletions
|
@ -21,6 +21,16 @@ namespace psf
|
||||||
dts = 1 << 9, // DTS 5.1 Ch.
|
dts = 1 << 9, // DTS 5.1 Ch.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum resolution_flag : s32
|
||||||
|
{
|
||||||
|
_480p = 1 << 0,
|
||||||
|
_576p = 1 << 1,
|
||||||
|
_720p = 1 << 2,
|
||||||
|
_1080p = 1 << 3,
|
||||||
|
_480p_16_9 = 1 << 4,
|
||||||
|
_576p_16_9 = 1 << 5,
|
||||||
|
};
|
||||||
|
|
||||||
enum class format : u16
|
enum class format : u16
|
||||||
{
|
{
|
||||||
array = 0x0004, // claimed to be a non-NTS string (char array)
|
array = 0x0004, // claimed to be a non-NTS string (char array)
|
||||||
|
|
|
@ -47,6 +47,18 @@ QString Localized::GetVerboseTimeByMs(quint64 elapsed_ms, bool show_days) const
|
||||||
return str_seconds;
|
return str_seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Localized::resolution::resolution()
|
||||||
|
: mode({
|
||||||
|
{ psf::resolution_flag::_480p, tr("480p") },
|
||||||
|
{ psf::resolution_flag::_576p, tr("576p") },
|
||||||
|
{ psf::resolution_flag::_720p, tr("720p") },
|
||||||
|
{ psf::resolution_flag::_1080p, tr("1080p") },
|
||||||
|
{ psf::resolution_flag::_480p_16_9, tr("480p 16:9") },
|
||||||
|
{ psf::resolution_flag::_576p_16_9, tr("576p 16:9") },
|
||||||
|
})
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Localized::sound::sound()
|
Localized::sound::sound()
|
||||||
: format({
|
: format({
|
||||||
{ psf::sound_format_flag::lpcm_2, tr("LPCM 2.0") },
|
{ psf::sound_format_flag::lpcm_2, tr("LPCM 2.0") },
|
||||||
|
|
|
@ -111,15 +111,8 @@ public:
|
||||||
const struct resolution
|
const struct resolution
|
||||||
{
|
{
|
||||||
// there might be different values for other categories
|
// there might be different values for other categories
|
||||||
const std::map<u32, QString> mode
|
resolution();
|
||||||
{
|
const std::map<u32, QString> mode;
|
||||||
{ 1 << 0, tr("480p") },
|
|
||||||
{ 1 << 1, tr("576p") },
|
|
||||||
{ 1 << 2, tr("720p") },
|
|
||||||
{ 1 << 3, tr("1080p") },
|
|
||||||
{ 1 << 4, tr("480p 16:9") },
|
|
||||||
{ 1 << 5, tr("576p 16:9") },
|
|
||||||
};
|
|
||||||
} resolution;
|
} resolution;
|
||||||
|
|
||||||
const struct sound
|
const struct sound
|
||||||
|
|
|
@ -451,12 +451,12 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||||
{
|
{
|
||||||
const std::map<u32, std::string> resolutions
|
const std::map<u32, std::string> resolutions
|
||||||
{
|
{
|
||||||
{ 1 << 0, fmt::format("%s", video_resolution::_480) },
|
{ psf::resolution_flag::_480p, fmt::format("%s", video_resolution::_480) },
|
||||||
{ 1 << 1, fmt::format("%s", video_resolution::_576) },
|
{ psf::resolution_flag::_576p, fmt::format("%s", video_resolution::_576) },
|
||||||
{ 1 << 2, fmt::format("%s", video_resolution::_720) },
|
{ psf::resolution_flag::_720p, fmt::format("%s", video_resolution::_720) },
|
||||||
{ 1 << 3, fmt::format("%s", video_resolution::_1080) },
|
{ psf::resolution_flag::_1080p, fmt::format("%s", video_resolution::_1080) },
|
||||||
// { 1 << 4, fmt::format("%s", video_resolution::_480p_16:9) },
|
// { psf::resolution_flag::_480p_16_9, fmt::format("%s", video_resolution::_480p_16:9) },
|
||||||
// { 1 << 5, fmt::format("%s", video_resolution::_576p_16:9) },
|
// { psf::resolution_flag::_576p_16_9, fmt::format("%s", video_resolution::_576p_16:9) },
|
||||||
};
|
};
|
||||||
|
|
||||||
const int saved_index = ui->resBox->currentIndex();
|
const int saved_index = ui->resBox->currentIndex();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue