Rename enum values to be more precise

This commit is contained in:
Megamouse 2024-04-28 17:39:20 +02:00
parent ee8629835b
commit 9f90ca1b48
7 changed files with 74 additions and 74 deletions

View File

@ -411,10 +411,10 @@ void rec_info::set_video_params(s32 video_format)
case video_resolution::_1080p:
case video_resolution::_1080i:
case video_resolution::_720p:
case video_resolution::_1600x1080:
case video_resolution::_1440x1080:
case video_resolution::_1280x1080:
case video_resolution::_960x1080:
case video_resolution::_1600x1080p:
case video_resolution::_1440x1080p:
case video_resolution::_1280x1080p:
case video_resolution::_960x1080p:
hd = true;
break;
case video_resolution::_480p:

View File

@ -13,47 +13,47 @@ LOG_CHANNEL(cellSysutil);
// NOTE: Unused in this module, but used by gs_frame to determine window size
const extern std::unordered_map<video_resolution, std::pair<int, int>, value_hash<video_resolution>> g_video_out_resolution_map
{
{ video_resolution::_1080p, { 1920, 1080 } },
{ video_resolution::_1080i, { 1920, 1080 } },
{ video_resolution::_720p, { 1280, 720 } },
{ video_resolution::_480p, { 720, 480 } },
{ video_resolution::_480i, { 720, 480 } },
{ video_resolution::_576p, { 720, 576 } },
{ video_resolution::_576i, { 720, 576 } },
{ video_resolution::_1600x1080, { 1600, 1080 } },
{ video_resolution::_1440x1080, { 1440, 1080 } },
{ video_resolution::_1280x1080, { 1280, 1080 } },
{ video_resolution::_960x1080, { 960, 1080 } },
{ video_resolution::_1080p, { 1920, 1080 } },
{ video_resolution::_1080i, { 1920, 1080 } },
{ video_resolution::_720p, { 1280, 720 } },
{ video_resolution::_480p, { 720, 480 } },
{ video_resolution::_480i, { 720, 480 } },
{ video_resolution::_576p, { 720, 576 } },
{ video_resolution::_576i, { 720, 576 } },
{ video_resolution::_1600x1080p, { 1600, 1080 } },
{ video_resolution::_1440x1080p, { 1440, 1080 } },
{ video_resolution::_1280x1080p, { 1280, 1080 } },
{ video_resolution::_960x1080p, { 960, 1080 } },
};
const extern std::unordered_map<video_resolution, CellVideoOutResolutionId, value_hash<video_resolution>> g_video_out_resolution_id
{
{ video_resolution::_1080p, CELL_VIDEO_OUT_RESOLUTION_1080 },
{ video_resolution::_1080i, CELL_VIDEO_OUT_RESOLUTION_1080 },
{ video_resolution::_720p, CELL_VIDEO_OUT_RESOLUTION_720 },
{ video_resolution::_480p, CELL_VIDEO_OUT_RESOLUTION_480 },
{ video_resolution::_480i, CELL_VIDEO_OUT_RESOLUTION_480 },
{ video_resolution::_576p, CELL_VIDEO_OUT_RESOLUTION_576 },
{ video_resolution::_576i, CELL_VIDEO_OUT_RESOLUTION_576 },
{ video_resolution::_1600x1080, CELL_VIDEO_OUT_RESOLUTION_1600x1080 },
{ video_resolution::_1440x1080, CELL_VIDEO_OUT_RESOLUTION_1440x1080 },
{ video_resolution::_1280x1080, CELL_VIDEO_OUT_RESOLUTION_1280x1080 },
{ video_resolution::_960x1080, CELL_VIDEO_OUT_RESOLUTION_960x1080 },
{ video_resolution::_1080p, CELL_VIDEO_OUT_RESOLUTION_1080 },
{ video_resolution::_1080i, CELL_VIDEO_OUT_RESOLUTION_1080 },
{ video_resolution::_720p, CELL_VIDEO_OUT_RESOLUTION_720 },
{ video_resolution::_480p, CELL_VIDEO_OUT_RESOLUTION_480 },
{ video_resolution::_480i, CELL_VIDEO_OUT_RESOLUTION_480 },
{ video_resolution::_576p, CELL_VIDEO_OUT_RESOLUTION_576 },
{ video_resolution::_576i, CELL_VIDEO_OUT_RESOLUTION_576 },
{ video_resolution::_1600x1080p, CELL_VIDEO_OUT_RESOLUTION_1600x1080 },
{ video_resolution::_1440x1080p, CELL_VIDEO_OUT_RESOLUTION_1440x1080 },
{ video_resolution::_1280x1080p, CELL_VIDEO_OUT_RESOLUTION_1280x1080 },
{ video_resolution::_960x1080p, CELL_VIDEO_OUT_RESOLUTION_960x1080 },
};
const extern std::unordered_map<video_resolution, CellVideoOutScanMode, value_hash<video_resolution>> g_video_out_scan_mode
{
{ video_resolution::_1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1080i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_720p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_480p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_480i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_576p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_576i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1080i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_720p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_480p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_480i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_576p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_576i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
{ video_resolution::_1600x1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1440x1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_1280x1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
{ video_resolution::_960x1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
};
const extern std::unordered_map<video_aspect, CellVideoOutDisplayAspect, value_hash<video_aspect>> g_video_out_aspect_id
@ -379,16 +379,16 @@ error_code cellVideoOutGetDeviceInfo(u32 videoOut, u32 deviceIndex, vm::ptr<Cell
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
}
break;
case video_resolution::_1600x1080:
case video_resolution::_1600x1080p:
add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
break;
case video_resolution::_1440x1080:
case video_resolution::_1440x1080p:
add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
break;
case video_resolution::_1280x1080:
case video_resolution::_1280x1080p:
add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
break;
case video_resolution::_960x1080:
case video_resolution::_960x1080p:
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
break;
}

View File

@ -176,9 +176,9 @@ struct av_get_monitor_info_cmd : public ps3av_cmd
return PS3AV_RESBIT_1920x1080P;
case video_resolution::_1080i:
return PS3AV_RESBIT_1920x1080I;
case video_resolution::_1600x1080:
case video_resolution::_1440x1080:
case video_resolution::_1280x1080:
case video_resolution::_1600x1080p:
case video_resolution::_1440x1080p:
case video_resolution::_1280x1080p:
case video_resolution::_720p:
return PS3AV_RESBIT_1280x720P;
case video_resolution::_576p:

View File

@ -274,17 +274,17 @@ static void fixup_settings(const psf::registry* _psf)
{
const std::map<video_resolution, u32> resolutions
{
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_720p, psf::resolution_flag::_720 },
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
{ video_resolution::_1600x1080, psf::resolution_flag::_1080 },
{ video_resolution::_1440x1080, psf::resolution_flag::_1080 },
{ video_resolution::_1280x1080, psf::resolution_flag::_1080 },
{ video_resolution::_960x1080, psf::resolution_flag::_1080 },
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_720p, psf::resolution_flag::_720 },
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
{ video_resolution::_1600x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1440x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1280x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_960x1080p, psf::resolution_flag::_1080 },
};
const video_resolution resolution = g_cfg.video.resolution;

View File

@ -47,10 +47,10 @@ void fmt_class_string<video_resolution>::format(std::string& out, u64 arg)
case video_resolution::_480i: return "720x480i";
case video_resolution::_576p: return "720x576";
case video_resolution::_576i: return "720x576i";
case video_resolution::_1600x1080: return "1600x1080";
case video_resolution::_1440x1080: return "1440x1080";
case video_resolution::_1280x1080: return "1280x1080";
case video_resolution::_960x1080: return "960x1080";
case video_resolution::_1600x1080p: return "1600x1080";
case video_resolution::_1440x1080p: return "1440x1080";
case video_resolution::_1280x1080p: return "1280x1080";
case video_resolution::_960x1080p: return "960x1080";
}
return unknown;

View File

@ -204,10 +204,10 @@ enum class video_resolution
_480i,
_576p,
_576i,
_1600x1080,
_1440x1080,
_1280x1080,
_960x1080,
_1600x1080p,
_1440x1080p,
_1280x1080p,
_960x1080p,
};
enum class video_aspect

View File

@ -465,17 +465,17 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
{
const std::map<video_resolution, u32> resolutions
{
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_720p, psf::resolution_flag::_720 },
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
{ video_resolution::_1600x1080, psf::resolution_flag::_1080 },
{ video_resolution::_1440x1080, psf::resolution_flag::_1080 },
{ video_resolution::_1280x1080, psf::resolution_flag::_1080 },
{ video_resolution::_960x1080, psf::resolution_flag::_1080 },
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
{ video_resolution::_720p, psf::resolution_flag::_720 },
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
{ video_resolution::_1600x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1440x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_1280x1080p, psf::resolution_flag::_1080 },
{ video_resolution::_960x1080p, psf::resolution_flag::_1080 },
};
const int saved_index = ui->resBox->currentIndex();