diff --git a/rpcs3/Loader/PSF.h b/rpcs3/Loader/PSF.h index ab2f132524..1d08df7a7a 100644 --- a/rpcs3/Loader/PSF.h +++ b/rpcs3/Loader/PSF.h @@ -21,6 +21,16 @@ namespace psf 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 { array = 0x0004, // claimed to be a non-NTS string (char array) diff --git a/rpcs3/rpcs3qt/localized.cpp b/rpcs3/rpcs3qt/localized.cpp index c395cfa39a..37822ec851 100644 --- a/rpcs3/rpcs3qt/localized.cpp +++ b/rpcs3/rpcs3qt/localized.cpp @@ -47,6 +47,18 @@ QString Localized::GetVerboseTimeByMs(quint64 elapsed_ms, bool show_days) const 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() : format({ { psf::sound_format_flag::lpcm_2, tr("LPCM 2.0") }, diff --git a/rpcs3/rpcs3qt/localized.h b/rpcs3/rpcs3qt/localized.h index 022f00b2e7..f288e01d11 100644 --- a/rpcs3/rpcs3qt/localized.h +++ b/rpcs3/rpcs3qt/localized.h @@ -111,15 +111,8 @@ public: const struct resolution { // there might be different values for other categories - const std::map 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(); + const std::map mode; } resolution; const struct sound diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index bfc7bc0afd..d54cb67630 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -451,12 +451,12 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std { const std::map resolutions { - { 1 << 0, fmt::format("%s", video_resolution::_480) }, - { 1 << 1, fmt::format("%s", video_resolution::_576) }, - { 1 << 2, fmt::format("%s", video_resolution::_720) }, - { 1 << 3, fmt::format("%s", video_resolution::_1080) }, - // { 1 << 4, fmt::format("%s", video_resolution::_480p_16:9) }, - // { 1 << 5, fmt::format("%s", video_resolution::_576p_16:9) }, + { psf::resolution_flag::_480p, fmt::format("%s", video_resolution::_480) }, + { psf::resolution_flag::_576p, fmt::format("%s", video_resolution::_576) }, + { psf::resolution_flag::_720p, fmt::format("%s", video_resolution::_720) }, + { psf::resolution_flag::_1080p, fmt::format("%s", video_resolution::_1080) }, + // { psf::resolution_flag::_480p_16_9, fmt::format("%s", video_resolution::_480p_16:9) }, + // { psf::resolution_flag::_576p_16_9, fmt::format("%s", video_resolution::_576p_16:9) }, }; const int saved_index = ui->resBox->currentIndex();