Fix readability and precision issues in aspectratio_lut (#13893)

This commit is contained in:
m4xw 2022-04-28 15:30:13 +02:00 committed by GitHub
parent a268ffe6ce
commit e389b8c7a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,31 +186,31 @@ static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = {
};
struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
{ 1.3333f, "4:3" },
{ 1.7778f, "16:9" },
{ 1.6f, "16:10" },
{ 16.0f / 15.0f, "16:15" },
{ 21.0f / 9.0f, "21:9" },
{ 1.0f, "1:1" },
{ 2.0f, "2:1" },
{ 1.5f, "3:2" },
{ 0.75f, "3:4" },
{ 4.0f, "4:1" },
{ 0.5625f, "9:16" },
{ 1.25f, "5:4" },
{ 1.2f, "6:5" },
{ 0.7777f, "7:9" },
{ 2.6666f, "8:3" },
{ 1.1428f, "8:7" },
{ 1.5833f, "19:12" },
{ 1.3571f, "19:14" },
{ 1.7647f, "30:17" },
{ 3.5555f, "32:9" },
{ 0.0f, "Config" },
{ 1.0f, "Square pixel" },
{ 1.0f, "Core provided" },
{ 0.0f, "Custom" },
{ 1.3333f, "Full" }
{ 4.0f / 3.0f , "4:3" },
{ 16.0f / 9.0f , "16:9" },
{ 16.0f / 10.0f, "16:10" },
{ 16.0f / 15.0f, "16:15" },
{ 21.0f / 9.0f , "21:9" },
{ 1.0f / 1.0f , "1:1" },
{ 2.0f / 1.0f , "2:1" },
{ 3.0f / 2.0f , "3:2" },
{ 3.0f / 4.0f , "3:4" },
{ 4.0f / 1.0f , "4:1" },
{ 9.0f / 16.0f , "9:16" },
{ 5.0f / 4.0f , "5:4" },
{ 6.0f / 5.0f , "6:5" },
{ 7.0f / 9.0f , "7:9" },
{ 8.0f / 3.0f , "8:3" },
{ 8.0f / 7.0f , "8:7" },
{ 19.0f / 12.0f, "19:12" },
{ 19.0f / 14.0f, "19:14" },
{ 30.0f / 17.0f, "30:17" },
{ 32.0f / 9.0f , "32:9" },
{ 0.0f , "Config" },
{ 1.0f , "Square pixel" },
{ 1.0f , "Core provided" },
{ 0.0f , "Custom" },
{ 4.0f / 3.0f , "Full" }
};
static void *video_null_init(const video_info_t *video,