From 46578a15d4c785307f71da796857a675c0476b44 Mon Sep 17 00:00:00 2001 From: fangrong Date: Thu, 5 Sep 2024 17:50:44 +0800 Subject: [PATCH] Merge from official master branch and bump version date --- arm9/data/config_template.ini | Bin 7545 -> 7836 bytes sysmodules/rosalina/data/config_template.ini | Bin 7545 -> 7836 bytes .../rosalina/include/menus/screen_filters.h | 2 +- .../menus/screen_filters_srgb_tables.h | 522 +----------------- sysmodules/rosalina/source/menus.c | 2 +- .../rosalina/source/menus/screen_filters.c | 18 +- 6 files changed, 13 insertions(+), 531 deletions(-) diff --git a/arm9/data/config_template.ini b/arm9/data/config_template.ini index 69b6c8f81722c8df48576b4e7b5fc81dafa6c23b..c2d69f68a3814299cecf223c82f07b2eacde9dfc 100644 GIT binary patch delta 793 zcmZva!DMvgY&H;lQV}+R?0%bteLW73Zj{0 zMHlZ#+r%7|Hi?xZPUH0V>8o?r1)XJ(>Jv2qZ++kywq8e;(%bjvH-xp1wnBT6-I@mW z$Q!WYWz?j`Bc4BI= z*l(*igFFQA+0~CQzLT5CI2Dv@+>$OTvTJM7n|>#-cgFa>DeZLA{4v z2F}Qa6X}OHFUfk{^k!S_^^pX%6Ah9q?5(CK=j>xgyUHEizHJbUSKE6bs>y$kR91N~pw%uA(-jQG5fa5r)bSBpS}aUW{s7S@)I_@b zpAVnyKOY`9z!A;q$+C)Mm_JEc6(r2W*BcYnOT@MP?UrK`IAh#>}g-2(5v7p z2tJ)RC;!^3haAE;^L@XW`EmB=^w-bVyOS56aqhmiDj}~Ro)UynZ?7(}2{9s>HNmRP z3D;leUofZK#yYAn*}-$7MWK!QMCLV8vmQ2brP7@?-pFC?4co&)sBIWja$V}>JH(&? zN8-7yJTi;=1V>qdHE{~psF&WG5=^#)kn!>I4%HT-T#q~bCHFQh(aTB5pEy9ztVM$nNpr&8MC4@GtLaEoR(SQbY`e zmm$&#=3(WfV_-or7^p1Cb{c(LaP#d>o$-tfQ=v*B*R0Z6&QeSjZHz%ADr@L#0A~1b zsy~*#{im7#!=RU{xTms(Gi9x7%laR0Qe)?f+tIX(dK=aeSwj;$iuLjR-u~}bZy#R% E1yzZ;qW}N^ diff --git a/sysmodules/rosalina/data/config_template.ini b/sysmodules/rosalina/data/config_template.ini index 69b6c8f81722c8df48576b4e7b5fc81dafa6c23b..c2d69f68a3814299cecf223c82f07b2eacde9dfc 100644 GIT binary patch delta 793 zcmZva!DMvgY&H;lQV}+R?0%bteLW73Zj{0 zMHlZ#+r%7|Hi?xZPUH0V>8o?r1)XJ(>Jv2qZ++kywq8e;(%bjvH-xp1wnBT6-I@mW z$Q!WYWz?j`Bc4BI= z*l(*igFFQA+0~CQzLT5CI2Dv@+>$OTvTJM7n|>#-cgFa>DeZLA{4v z2F}Qa6X}OHFUfk{^k!S_^^pX%6Ah9q?5(CK=j>xgyUHEizHJbUSKE6bs>y$kR91N~pw%uA(-jQG5fa5r)bSBpS}aUW{s7S@)I_@b zpAVnyKOY`9z!A;q$+C)Mm_JEc6(r2W*BcYnOT@MP?UrK`IAh#>}g-2(5v7p z2tJ)RC;!^3haAE;^L@XW`EmB=^w-bVyOS56aqhmiDj}~Ro)UynZ?7(}2{9s>HNmRP z3D;leUofZK#yYAn*}-$7MWK!QMCLV8vmQ2brP7@?-pFC?4co&)sBIWja$V}>JH(&? zN8-7yJTi;=1V>qdHE{~psF&WG5=^#)kn!>I4%HT-T#q~bCHFQh(aTB5pEy9ztVM$nNpr&8MC4@GtLaEoR(SQbY`e zmm$&#=3(WfV_-or7^p1Cb{c(LaP#d>o$-tfQ=v*B*R0Z6&QeSjZHz%ADr@L#0A~1b zsy~*#{im7#!=RU{xTms(Gi9x7%laR0Qe)?f+tIX(dK=aeSwj;$iuLjR-u~}bZy#R% E1yzZ;qW}N^ diff --git a/sysmodules/rosalina/include/menus/screen_filters.h b/sysmodules/rosalina/include/menus/screen_filters.h index f3cf6bffe..8b9441ca6 100644 --- a/sysmodules/rosalina/include/menus/screen_filters.h +++ b/sysmodules/rosalina/include/menus/screen_filters.h @@ -57,7 +57,7 @@ void ScreenFiltersMenu_SetWarmIncandescent(void); // 2300K void ScreenFiltersMenu_SetCandle(void); // 1900K void ScreenFiltersMenu_SetEmber(void); // 1200K -void ScreenFiltersMenu_SetSrgbColorCurves(void); +void ScreenFiltersMenu_SetTopScreenSrgbColorCurve(void); void ScreenFiltersMenu_RestoreColorCurves(void); void ScreenFiltersMenu_AdvancedConfiguration(void); diff --git a/sysmodules/rosalina/include/menus/screen_filters_srgb_tables.h b/sysmodules/rosalina/include/menus/screen_filters_srgb_tables.h index 062eb2f72..688601614 100644 --- a/sysmodules/rosalina/include/menus/screen_filters_srgb_tables.h +++ b/sysmodules/rosalina/include/menus/screen_filters_srgb_tables.h @@ -5,7 +5,7 @@ #include <3ds/types.h> static const u8 ctrToSrgbTableTop[256][3] = { - { 0x00, 0x00, 0x00, }, + { 0x00, 0x00, 0x00, }, // i = 0x00 { 0x01, 0x01, 0x01, }, // i = 0x01 { 0x02, 0x01, 0x02, }, // i = 0x02 { 0x03, 0x02, 0x03, }, // i = 0x03 @@ -263,269 +263,10 @@ static const u8 ctrToSrgbTableTop[256][3] = { { 0xFF, 0xFF, 0xFF, }, // i = 0xFF }; -static const u8 ctrToSrgbTableBottom[256][3] = { - { 0x00, 0x00, 0x00, }, // i = 0x00 - { 0x01, 0x00, 0x00, }, // i = 0x01 - { 0x01, 0x00, 0x01, }, // i = 0x02 - { 0x02, 0x01, 0x01, }, // i = 0x03 - { 0x02, 0x01, 0x02, }, // i = 0x04 - { 0x03, 0x01, 0x03, }, // i = 0x05 - { 0x04, 0x02, 0x03, }, // i = 0x06 - { 0x04, 0x02, 0x04, }, // i = 0x07 - { 0x05, 0x02, 0x04, }, // i = 0x08 - { 0x05, 0x03, 0x05, }, // i = 0x09 - { 0x06, 0x03, 0x05, }, // i = 0x0A - { 0x07, 0x04, 0x06, }, // i = 0x0B - { 0x07, 0x04, 0x07, }, // i = 0x0C - { 0x08, 0x05, 0x07, }, // i = 0x0D - { 0x09, 0x05, 0x08, }, // i = 0x0E - { 0x0A, 0x06, 0x08, }, // i = 0x0F - { 0x0A, 0x06, 0x09, }, // i = 0x10 - { 0x0B, 0x07, 0x0A, }, // i = 0x11 - { 0x0C, 0x08, 0x0A, }, // i = 0x12 - { 0x0C, 0x08, 0x0B, }, // i = 0x13 - { 0x0D, 0x09, 0x0C, }, // i = 0x14 - { 0x0E, 0x09, 0x0C, }, // i = 0x15 - { 0x0F, 0x0A, 0x0D, }, // i = 0x16 - { 0x10, 0x0B, 0x0E, }, // i = 0x17 - { 0x10, 0x0B, 0x0F, }, // i = 0x18 - { 0x11, 0x0C, 0x0F, }, // i = 0x19 - { 0x12, 0x0D, 0x10, }, // i = 0x1A - { 0x13, 0x0D, 0x11, }, // i = 0x1B - { 0x14, 0x0E, 0x12, }, // i = 0x1C - { 0x14, 0x0F, 0x12, }, // i = 0x1D - { 0x15, 0x10, 0x13, }, // i = 0x1E - { 0x16, 0x10, 0x14, }, // i = 0x1F - { 0x17, 0x11, 0x15, }, // i = 0x20 - { 0x18, 0x12, 0x15, }, // i = 0x21 - { 0x19, 0x13, 0x16, }, // i = 0x22 - { 0x19, 0x13, 0x17, }, // i = 0x23 - { 0x1A, 0x14, 0x18, }, // i = 0x24 - { 0x1B, 0x15, 0x18, }, // i = 0x25 - { 0x1C, 0x16, 0x19, }, // i = 0x26 - { 0x1D, 0x17, 0x1A, }, // i = 0x27 - { 0x1E, 0x18, 0x1B, }, // i = 0x28 - { 0x1F, 0x18, 0x1C, }, // i = 0x29 - { 0x20, 0x19, 0x1C, }, // i = 0x2A - { 0x21, 0x1A, 0x1D, }, // i = 0x2B - { 0x22, 0x1B, 0x1E, }, // i = 0x2C - { 0x22, 0x1C, 0x1F, }, // i = 0x2D - { 0x23, 0x1D, 0x20, }, // i = 0x2E - { 0x24, 0x1E, 0x21, }, // i = 0x2F - { 0x25, 0x1E, 0x21, }, // i = 0x30 - { 0x26, 0x1F, 0x22, }, // i = 0x31 - { 0x27, 0x20, 0x23, }, // i = 0x32 - { 0x28, 0x21, 0x24, }, // i = 0x33 - { 0x29, 0x22, 0x25, }, // i = 0x34 - { 0x2A, 0x23, 0x26, }, // i = 0x35 - { 0x2B, 0x24, 0x27, }, // i = 0x36 - { 0x2C, 0x25, 0x27, }, // i = 0x37 - { 0x2D, 0x26, 0x28, }, // i = 0x38 - { 0x2E, 0x27, 0x29, }, // i = 0x39 - { 0x2F, 0x28, 0x2A, }, // i = 0x3A - { 0x30, 0x29, 0x2B, }, // i = 0x3B - { 0x31, 0x2A, 0x2C, }, // i = 0x3C - { 0x32, 0x2A, 0x2D, }, // i = 0x3D - { 0x33, 0x2B, 0x2E, }, // i = 0x3E - { 0x34, 0x2C, 0x2E, }, // i = 0x3F - { 0x35, 0x2D, 0x2F, }, // i = 0x40 - { 0x36, 0x2E, 0x30, }, // i = 0x41 - { 0x37, 0x2F, 0x31, }, // i = 0x42 - { 0x38, 0x30, 0x32, }, // i = 0x43 - { 0x39, 0x31, 0x33, }, // i = 0x44 - { 0x3A, 0x32, 0x34, }, // i = 0x45 - { 0x3B, 0x33, 0x35, }, // i = 0x46 - { 0x3C, 0x34, 0x36, }, // i = 0x47 - { 0x3D, 0x35, 0x36, }, // i = 0x48 - { 0x3E, 0x36, 0x37, }, // i = 0x49 - { 0x3F, 0x37, 0x38, }, // i = 0x4A - { 0x40, 0x38, 0x39, }, // i = 0x4B - { 0x41, 0x39, 0x3A, }, // i = 0x4C - { 0x42, 0x3A, 0x3B, }, // i = 0x4D - { 0x43, 0x3B, 0x3C, }, // i = 0x4E - { 0x44, 0x3C, 0x3D, }, // i = 0x4F - { 0x45, 0x3D, 0x3E, }, // i = 0x50 - { 0x46, 0x3E, 0x3F, }, // i = 0x51 - { 0x47, 0x3F, 0x40, }, // i = 0x52 - { 0x49, 0x40, 0x41, }, // i = 0x53 - { 0x4A, 0x41, 0x42, }, // i = 0x54 - { 0x4B, 0x42, 0x42, }, // i = 0x55 - { 0x4C, 0x43, 0x43, }, // i = 0x56 - { 0x4D, 0x44, 0x44, }, // i = 0x57 - { 0x4E, 0x45, 0x45, }, // i = 0x58 - { 0x4F, 0x46, 0x46, }, // i = 0x59 - { 0x50, 0x47, 0x47, }, // i = 0x5A - { 0x51, 0x48, 0x48, }, // i = 0x5B - { 0x52, 0x49, 0x49, }, // i = 0x5C - { 0x53, 0x4A, 0x4A, }, // i = 0x5D - { 0x54, 0x4B, 0x4B, }, // i = 0x5E - { 0x55, 0x4C, 0x4C, }, // i = 0x5F - { 0x56, 0x4D, 0x4D, }, // i = 0x60 - { 0x57, 0x4E, 0x4E, }, // i = 0x61 - { 0x58, 0x4F, 0x4F, }, // i = 0x62 - { 0x5A, 0x50, 0x50, }, // i = 0x63 - { 0x5B, 0x51, 0x51, }, // i = 0x64 - { 0x5C, 0x52, 0x52, }, // i = 0x65 - { 0x5D, 0x53, 0x53, }, // i = 0x66 - { 0x5E, 0x54, 0x54, }, // i = 0x67 - { 0x5F, 0x55, 0x54, }, // i = 0x68 - { 0x60, 0x56, 0x55, }, // i = 0x69 - { 0x61, 0x57, 0x56, }, // i = 0x6A - { 0x62, 0x58, 0x57, }, // i = 0x6B - { 0x63, 0x59, 0x58, }, // i = 0x6C - { 0x64, 0x5B, 0x59, }, // i = 0x6D - { 0x65, 0x5C, 0x5A, }, // i = 0x6E - { 0x66, 0x5D, 0x5B, }, // i = 0x6F - { 0x68, 0x5E, 0x5C, }, // i = 0x70 - { 0x69, 0x5F, 0x5D, }, // i = 0x71 - { 0x6A, 0x60, 0x5E, }, // i = 0x72 - { 0x6B, 0x61, 0x5F, }, // i = 0x73 - { 0x6C, 0x62, 0x60, }, // i = 0x74 - { 0x6D, 0x63, 0x61, }, // i = 0x75 - { 0x6E, 0x64, 0x62, }, // i = 0x76 - { 0x6F, 0x65, 0x63, }, // i = 0x77 - { 0x70, 0x66, 0x64, }, // i = 0x78 - { 0x71, 0x67, 0x65, }, // i = 0x79 - { 0x72, 0x68, 0x66, }, // i = 0x7A - { 0x73, 0x69, 0x67, }, // i = 0x7B - { 0x74, 0x6A, 0x68, }, // i = 0x7C - { 0x76, 0x6B, 0x69, }, // i = 0x7D - { 0x77, 0x6C, 0x6A, }, // i = 0x7E - { 0x78, 0x6D, 0x6B, }, // i = 0x7F - { 0x79, 0x6E, 0x6C, }, // i = 0x80 - { 0x7A, 0x70, 0x6D, }, // i = 0x81 - { 0x7B, 0x71, 0x6E, }, // i = 0x82 - { 0x7C, 0x72, 0x6F, }, // i = 0x83 - { 0x7D, 0x73, 0x70, }, // i = 0x84 - { 0x7E, 0x74, 0x71, }, // i = 0x85 - { 0x7F, 0x75, 0x72, }, // i = 0x86 - { 0x80, 0x76, 0x73, }, // i = 0x87 - { 0x82, 0x77, 0x74, }, // i = 0x88 - { 0x83, 0x78, 0x75, }, // i = 0x89 - { 0x84, 0x79, 0x76, }, // i = 0x8A - { 0x85, 0x7A, 0x77, }, // i = 0x8B - { 0x86, 0x7B, 0x78, }, // i = 0x8C - { 0x87, 0x7C, 0x79, }, // i = 0x8D - { 0x88, 0x7E, 0x7A, }, // i = 0x8E - { 0x89, 0x7F, 0x7B, }, // i = 0x8F - { 0x8A, 0x80, 0x7C, }, // i = 0x90 - { 0x8B, 0x81, 0x7D, }, // i = 0x91 - { 0x8C, 0x82, 0x7E, }, // i = 0x92 - { 0x8D, 0x83, 0x7F, }, // i = 0x93 - { 0x8F, 0x84, 0x80, }, // i = 0x94 - { 0x90, 0x85, 0x81, }, // i = 0x95 - { 0x91, 0x86, 0x82, }, // i = 0x96 - { 0x92, 0x87, 0x84, }, // i = 0x97 - { 0x93, 0x88, 0x85, }, // i = 0x98 - { 0x94, 0x8A, 0x86, }, // i = 0x99 - { 0x95, 0x8B, 0x87, }, // i = 0x9A - { 0x96, 0x8C, 0x88, }, // i = 0x9B - { 0x97, 0x8D, 0x89, }, // i = 0x9C - { 0x98, 0x8E, 0x8A, }, // i = 0x9D - { 0x99, 0x8F, 0x8B, }, // i = 0x9E - { 0x9B, 0x90, 0x8C, }, // i = 0x9F - { 0x9C, 0x91, 0x8D, }, // i = 0xA0 - { 0x9D, 0x92, 0x8E, }, // i = 0xA1 - { 0x9E, 0x94, 0x8F, }, // i = 0xA2 - { 0x9F, 0x95, 0x90, }, // i = 0xA3 - { 0xA0, 0x96, 0x91, }, // i = 0xA4 - { 0xA1, 0x97, 0x92, }, // i = 0xA5 - { 0xA2, 0x98, 0x93, }, // i = 0xA6 - { 0xA3, 0x99, 0x94, }, // i = 0xA7 - { 0xA4, 0x9A, 0x95, }, // i = 0xA8 - { 0xA5, 0x9B, 0x97, }, // i = 0xA9 - { 0xA7, 0x9C, 0x98, }, // i = 0xAA - { 0xA8, 0x9E, 0x99, }, // i = 0xAB - { 0xA9, 0x9F, 0x9A, }, // i = 0xAC - { 0xAA, 0xA0, 0x9B, }, // i = 0xAD - { 0xAB, 0xA1, 0x9C, }, // i = 0xAE - { 0xAC, 0xA2, 0x9D, }, // i = 0xAF - { 0xAD, 0xA3, 0x9E, }, // i = 0xB0 - { 0xAE, 0xA4, 0x9F, }, // i = 0xB1 - { 0xAF, 0xA5, 0xA0, }, // i = 0xB2 - { 0xB0, 0xA7, 0xA1, }, // i = 0xB3 - { 0xB1, 0xA8, 0xA3, }, // i = 0xB4 - { 0xB3, 0xA9, 0xA4, }, // i = 0xB5 - { 0xB4, 0xAA, 0xA5, }, // i = 0xB6 - { 0xB5, 0xAB, 0xA6, }, // i = 0xB7 - { 0xB6, 0xAC, 0xA7, }, // i = 0xB8 - { 0xB7, 0xAD, 0xA8, }, // i = 0xB9 - { 0xB8, 0xAF, 0xA9, }, // i = 0xBA - { 0xB9, 0xB0, 0xAA, }, // i = 0xBB - { 0xBA, 0xB1, 0xAB, }, // i = 0xBC - { 0xBB, 0xB2, 0xAD, }, // i = 0xBD - { 0xBC, 0xB3, 0xAE, }, // i = 0xBE - { 0xBD, 0xB4, 0xAF, }, // i = 0xBF - { 0xBE, 0xB5, 0xB0, }, // i = 0xC0 - { 0xC0, 0xB7, 0xB1, }, // i = 0xC1 - { 0xC1, 0xB8, 0xB2, }, // i = 0xC2 - { 0xC2, 0xB9, 0xB3, }, // i = 0xC3 - { 0xC3, 0xBA, 0xB5, }, // i = 0xC4 - { 0xC4, 0xBB, 0xB6, }, // i = 0xC5 - { 0xC5, 0xBC, 0xB7, }, // i = 0xC6 - { 0xC6, 0xBE, 0xB8, }, // i = 0xC7 - { 0xC7, 0xBF, 0xB9, }, // i = 0xC8 - { 0xC8, 0xC0, 0xBA, }, // i = 0xC9 - { 0xC9, 0xC1, 0xBB, }, // i = 0xCA - { 0xCA, 0xC2, 0xBD, }, // i = 0xCB - { 0xCC, 0xC3, 0xBE, }, // i = 0xCC - { 0xCD, 0xC4, 0xBF, }, // i = 0xCD - { 0xCE, 0xC6, 0xC0, }, // i = 0xCE - { 0xCF, 0xC7, 0xC1, }, // i = 0xCF - { 0xD0, 0xC8, 0xC2, }, // i = 0xD0 - { 0xD1, 0xC9, 0xC4, }, // i = 0xD1 - { 0xD2, 0xCA, 0xC5, }, // i = 0xD2 - { 0xD3, 0xCB, 0xC6, }, // i = 0xD3 - { 0xD4, 0xCD, 0xC7, }, // i = 0xD4 - { 0xD5, 0xCE, 0xC8, }, // i = 0xD5 - { 0xD6, 0xCF, 0xCA, }, // i = 0xD6 - { 0xD7, 0xD0, 0xCB, }, // i = 0xD7 - { 0xD8, 0xD1, 0xCC, }, // i = 0xD8 - { 0xD9, 0xD2, 0xCD, }, // i = 0xD9 - { 0xDB, 0xD4, 0xCE, }, // i = 0xDA - { 0xDC, 0xD5, 0xD0, }, // i = 0xDB - { 0xDD, 0xD6, 0xD1, }, // i = 0xDC - { 0xDE, 0xD7, 0xD2, }, // i = 0xDD - { 0xDF, 0xD8, 0xD3, }, // i = 0xDE - { 0xE0, 0xD9, 0xD5, }, // i = 0xDF - { 0xE1, 0xDB, 0xD6, }, // i = 0xE0 - { 0xE2, 0xDC, 0xD7, }, // i = 0xE1 - { 0xE3, 0xDD, 0xD8, }, // i = 0xE2 - { 0xE4, 0xDE, 0xDA, }, // i = 0xE3 - { 0xE5, 0xDF, 0xDB, }, // i = 0xE4 - { 0xE6, 0xE0, 0xDC, }, // i = 0xE5 - { 0xE7, 0xE2, 0xDD, }, // i = 0xE6 - { 0xE8, 0xE3, 0xDF, }, // i = 0xE7 - { 0xE9, 0xE4, 0xE0, }, // i = 0xE8 - { 0xEA, 0xE5, 0xE1, }, // i = 0xE9 - { 0xEB, 0xE6, 0xE3, }, // i = 0xEA - { 0xEC, 0xE8, 0xE4, }, // i = 0xEB - { 0xED, 0xE9, 0xE5, }, // i = 0xEC - { 0xEE, 0xEA, 0xE7, }, // i = 0xED - { 0xEF, 0xEB, 0xE8, }, // i = 0xEE - { 0xF0, 0xEC, 0xE9, }, // i = 0xEF - { 0xF1, 0xED, 0xEB, }, // i = 0xF0 - { 0xF2, 0xEF, 0xEC, }, // i = 0xF1 - { 0xF3, 0xF0, 0xED, }, // i = 0xF2 - { 0xF4, 0xF1, 0xEF, }, // i = 0xF3 - { 0xF5, 0xF2, 0xF0, }, // i = 0xF4 - { 0xF6, 0xF3, 0xF1, }, // i = 0xF5 - { 0xF7, 0xF5, 0xF3, }, // i = 0xF6 - { 0xF8, 0xF6, 0xF4, }, // i = 0xF7 - { 0xF9, 0xF7, 0xF6, }, // i = 0xF8 - { 0xFA, 0xF8, 0xF7, }, // i = 0xF9 - { 0xFB, 0xFA, 0xF8, }, // i = 0xFA - { 0xFC, 0xFB, 0xFA, }, // i = 0xFB - { 0xFD, 0xFC, 0xFB, }, // i = 0xFC - { 0xFE, 0xFD, 0xFD, }, // i = 0xFD - { 0xFE, 0xFE, 0xFE, }, // i = 0xFE - { 0xFF, 0xFF, 0xFF, }, // i = 0xFF -}; - // ------------------------------------------------- // For reference, the sRGB to CTR color space LUTs -// Above tables were computed with y = x - (f(x) - x) +// Above table(s) were computed with y = x - (f(x) - x) static const u8 srgbToCtrTableTop[256][3] = { { 0x00, 0x00, 0x00, }, // i = 0x00 @@ -785,262 +526,3 @@ static const u8 srgbToCtrTableTop[256][3] = { { 0xFE, 0xFE, 0xFF, }, // i = 0xFE { 0xFF, 0xFF, 0xFF, }, // i = 0xFF }; - -static const u8 srgbToCtrTableBottom[256][3] = { - { 0x00, 0x00, 0x00, }, // i = 0x00 - { 0x01, 0x02, 0x02, }, // i = 0x01 - { 0x03, 0x04, 0x03, }, // i = 0x02 - { 0x04, 0x05, 0x05, }, // i = 0x03 - { 0x06, 0x07, 0x06, }, // i = 0x04 - { 0x07, 0x09, 0x07, }, // i = 0x05 - { 0x08, 0x0A, 0x09, }, // i = 0x06 - { 0x0A, 0x0C, 0x0A, }, // i = 0x07 - { 0x0B, 0x0E, 0x0C, }, // i = 0x08 - { 0x0D, 0x0F, 0x0D, }, // i = 0x09 - { 0x0E, 0x11, 0x0F, }, // i = 0x0A - { 0x0F, 0x12, 0x10, }, // i = 0x0B - { 0x11, 0x14, 0x11, }, // i = 0x0C - { 0x12, 0x15, 0x13, }, // i = 0x0D - { 0x13, 0x17, 0x14, }, // i = 0x0E - { 0x14, 0x18, 0x16, }, // i = 0x0F - { 0x16, 0x1A, 0x17, }, // i = 0x10 - { 0x17, 0x1B, 0x18, }, // i = 0x11 - { 0x18, 0x1C, 0x1A, }, // i = 0x12 - { 0x1A, 0x1E, 0x1B, }, // i = 0x13 - { 0x1B, 0x1F, 0x1C, }, // i = 0x14 - { 0x1C, 0x21, 0x1E, }, // i = 0x15 - { 0x1D, 0x22, 0x1F, }, // i = 0x16 - { 0x1E, 0x23, 0x20, }, // i = 0x17 - { 0x20, 0x25, 0x21, }, // i = 0x18 - { 0x21, 0x26, 0x23, }, // i = 0x19 - { 0x22, 0x27, 0x24, }, // i = 0x1A - { 0x23, 0x29, 0x25, }, // i = 0x1B - { 0x24, 0x2A, 0x26, }, // i = 0x1C - { 0x26, 0x2B, 0x28, }, // i = 0x1D - { 0x27, 0x2C, 0x29, }, // i = 0x1E - { 0x28, 0x2E, 0x2A, }, // i = 0x1F - { 0x29, 0x2F, 0x2B, }, // i = 0x20 - { 0x2A, 0x30, 0x2D, }, // i = 0x21 - { 0x2B, 0x31, 0x2E, }, // i = 0x22 - { 0x2D, 0x33, 0x2F, }, // i = 0x23 - { 0x2E, 0x34, 0x30, }, // i = 0x24 - { 0x2F, 0x35, 0x32, }, // i = 0x25 - { 0x30, 0x36, 0x33, }, // i = 0x26 - { 0x31, 0x37, 0x34, }, // i = 0x27 - { 0x32, 0x38, 0x35, }, // i = 0x28 - { 0x33, 0x3A, 0x36, }, // i = 0x29 - { 0x34, 0x3B, 0x38, }, // i = 0x2A - { 0x35, 0x3C, 0x39, }, // i = 0x2B - { 0x36, 0x3D, 0x3A, }, // i = 0x2C - { 0x38, 0x3E, 0x3B, }, // i = 0x2D - { 0x39, 0x3F, 0x3C, }, // i = 0x2E - { 0x3A, 0x40, 0x3D, }, // i = 0x2F - { 0x3B, 0x42, 0x3F, }, // i = 0x30 - { 0x3C, 0x43, 0x40, }, // i = 0x31 - { 0x3D, 0x44, 0x41, }, // i = 0x32 - { 0x3E, 0x45, 0x42, }, // i = 0x33 - { 0x3F, 0x46, 0x43, }, // i = 0x34 - { 0x40, 0x47, 0x44, }, // i = 0x35 - { 0x41, 0x48, 0x45, }, // i = 0x36 - { 0x42, 0x49, 0x47, }, // i = 0x37 - { 0x43, 0x4A, 0x48, }, // i = 0x38 - { 0x44, 0x4B, 0x49, }, // i = 0x39 - { 0x45, 0x4C, 0x4A, }, // i = 0x3A - { 0x46, 0x4D, 0x4B, }, // i = 0x3B - { 0x47, 0x4E, 0x4C, }, // i = 0x3C - { 0x48, 0x50, 0x4D, }, // i = 0x3D - { 0x49, 0x51, 0x4E, }, // i = 0x3E - { 0x4A, 0x52, 0x50, }, // i = 0x3F - { 0x4B, 0x53, 0x51, }, // i = 0x40 - { 0x4C, 0x54, 0x52, }, // i = 0x41 - { 0x4D, 0x55, 0x53, }, // i = 0x42 - { 0x4E, 0x56, 0x54, }, // i = 0x43 - { 0x4F, 0x57, 0x55, }, // i = 0x44 - { 0x50, 0x58, 0x56, }, // i = 0x45 - { 0x51, 0x59, 0x57, }, // i = 0x46 - { 0x52, 0x5A, 0x58, }, // i = 0x47 - { 0x53, 0x5B, 0x5A, }, // i = 0x48 - { 0x54, 0x5C, 0x5B, }, // i = 0x49 - { 0x55, 0x5D, 0x5C, }, // i = 0x4A - { 0x56, 0x5E, 0x5D, }, // i = 0x4B - { 0x57, 0x5F, 0x5E, }, // i = 0x4C - { 0x58, 0x60, 0x5F, }, // i = 0x4D - { 0x59, 0x61, 0x60, }, // i = 0x4E - { 0x5A, 0x62, 0x61, }, // i = 0x4F - { 0x5B, 0x63, 0x62, }, // i = 0x50 - { 0x5C, 0x64, 0x63, }, // i = 0x51 - { 0x5D, 0x65, 0x64, }, // i = 0x52 - { 0x5D, 0x66, 0x65, }, // i = 0x53 - { 0x5E, 0x67, 0x66, }, // i = 0x54 - { 0x5F, 0x68, 0x68, }, // i = 0x55 - { 0x60, 0x69, 0x69, }, // i = 0x56 - { 0x61, 0x6A, 0x6A, }, // i = 0x57 - { 0x62, 0x6B, 0x6B, }, // i = 0x58 - { 0x63, 0x6C, 0x6C, }, // i = 0x59 - { 0x64, 0x6D, 0x6D, }, // i = 0x5A - { 0x65, 0x6E, 0x6E, }, // i = 0x5B - { 0x66, 0x6F, 0x6F, }, // i = 0x5C - { 0x67, 0x70, 0x70, }, // i = 0x5D - { 0x68, 0x71, 0x71, }, // i = 0x5E - { 0x69, 0x72, 0x72, }, // i = 0x5F - { 0x6A, 0x73, 0x73, }, // i = 0x60 - { 0x6B, 0x74, 0x74, }, // i = 0x61 - { 0x6C, 0x75, 0x75, }, // i = 0x62 - { 0x6C, 0x76, 0x76, }, // i = 0x63 - { 0x6D, 0x77, 0x77, }, // i = 0x64 - { 0x6E, 0x78, 0x78, }, // i = 0x65 - { 0x6F, 0x79, 0x79, }, // i = 0x66 - { 0x70, 0x7A, 0x7A, }, // i = 0x67 - { 0x71, 0x7B, 0x7C, }, // i = 0x68 - { 0x72, 0x7C, 0x7D, }, // i = 0x69 - { 0x73, 0x7D, 0x7E, }, // i = 0x6A - { 0x74, 0x7E, 0x7F, }, // i = 0x6B - { 0x75, 0x7F, 0x80, }, // i = 0x6C - { 0x76, 0x7F, 0x81, }, // i = 0x6D - { 0x77, 0x80, 0x82, }, // i = 0x6E - { 0x78, 0x81, 0x83, }, // i = 0x6F - { 0x78, 0x82, 0x84, }, // i = 0x70 - { 0x79, 0x83, 0x85, }, // i = 0x71 - { 0x7A, 0x84, 0x86, }, // i = 0x72 - { 0x7B, 0x85, 0x87, }, // i = 0x73 - { 0x7C, 0x86, 0x88, }, // i = 0x74 - { 0x7D, 0x87, 0x89, }, // i = 0x75 - { 0x7E, 0x88, 0x8A, }, // i = 0x76 - { 0x7F, 0x89, 0x8B, }, // i = 0x77 - { 0x80, 0x8A, 0x8C, }, // i = 0x78 - { 0x81, 0x8B, 0x8D, }, // i = 0x79 - { 0x82, 0x8C, 0x8E, }, // i = 0x7A - { 0x83, 0x8D, 0x8F, }, // i = 0x7B - { 0x84, 0x8E, 0x90, }, // i = 0x7C - { 0x84, 0x8F, 0x91, }, // i = 0x7D - { 0x85, 0x90, 0x92, }, // i = 0x7E - { 0x86, 0x91, 0x93, }, // i = 0x7F - { 0x87, 0x92, 0x94, }, // i = 0x80 - { 0x88, 0x92, 0x95, }, // i = 0x81 - { 0x89, 0x93, 0x96, }, // i = 0x82 - { 0x8A, 0x94, 0x97, }, // i = 0x83 - { 0x8B, 0x95, 0x98, }, // i = 0x84 - { 0x8C, 0x96, 0x99, }, // i = 0x85 - { 0x8D, 0x97, 0x9A, }, // i = 0x86 - { 0x8E, 0x98, 0x9B, }, // i = 0x87 - { 0x8E, 0x99, 0x9C, }, // i = 0x88 - { 0x8F, 0x9A, 0x9D, }, // i = 0x89 - { 0x90, 0x9B, 0x9E, }, // i = 0x8A - { 0x91, 0x9C, 0x9F, }, // i = 0x8B - { 0x92, 0x9D, 0xA0, }, // i = 0x8C - { 0x93, 0x9E, 0xA1, }, // i = 0x8D - { 0x94, 0x9E, 0xA2, }, // i = 0x8E - { 0x95, 0x9F, 0xA3, }, // i = 0x8F - { 0x96, 0xA0, 0xA4, }, // i = 0x90 - { 0x97, 0xA1, 0xA5, }, // i = 0x91 - { 0x98, 0xA2, 0xA6, }, // i = 0x92 - { 0x99, 0xA3, 0xA7, }, // i = 0x93 - { 0x99, 0xA4, 0xA8, }, // i = 0x94 - { 0x9A, 0xA5, 0xA9, }, // i = 0x95 - { 0x9B, 0xA6, 0xAA, }, // i = 0x96 - { 0x9C, 0xA7, 0xAA, }, // i = 0x97 - { 0x9D, 0xA8, 0xAB, }, // i = 0x98 - { 0x9E, 0xA8, 0xAC, }, // i = 0x99 - { 0x9F, 0xA9, 0xAD, }, // i = 0x9A - { 0xA0, 0xAA, 0xAE, }, // i = 0x9B - { 0xA1, 0xAB, 0xAF, }, // i = 0x9C - { 0xA2, 0xAC, 0xB0, }, // i = 0x9D - { 0xA3, 0xAD, 0xB1, }, // i = 0x9E - { 0xA3, 0xAE, 0xB2, }, // i = 0x9F - { 0xA4, 0xAF, 0xB3, }, // i = 0xA0 - { 0xA5, 0xB0, 0xB4, }, // i = 0xA1 - { 0xA6, 0xB0, 0xB5, }, // i = 0xA2 - { 0xA7, 0xB1, 0xB6, }, // i = 0xA3 - { 0xA8, 0xB2, 0xB7, }, // i = 0xA4 - { 0xA9, 0xB3, 0xB8, }, // i = 0xA5 - { 0xAA, 0xB4, 0xB9, }, // i = 0xA6 - { 0xAB, 0xB5, 0xBA, }, // i = 0xA7 - { 0xAC, 0xB6, 0xBB, }, // i = 0xA8 - { 0xAD, 0xB7, 0xBB, }, // i = 0xA9 - { 0xAD, 0xB8, 0xBC, }, // i = 0xAA - { 0xAE, 0xB8, 0xBD, }, // i = 0xAB - { 0xAF, 0xB9, 0xBE, }, // i = 0xAC - { 0xB0, 0xBA, 0xBF, }, // i = 0xAD - { 0xB1, 0xBB, 0xC0, }, // i = 0xAE - { 0xB2, 0xBC, 0xC1, }, // i = 0xAF - { 0xB3, 0xBD, 0xC2, }, // i = 0xB0 - { 0xB4, 0xBE, 0xC3, }, // i = 0xB1 - { 0xB5, 0xBF, 0xC4, }, // i = 0xB2 - { 0xB6, 0xBF, 0xC5, }, // i = 0xB3 - { 0xB7, 0xC0, 0xC5, }, // i = 0xB4 - { 0xB7, 0xC1, 0xC6, }, // i = 0xB5 - { 0xB8, 0xC2, 0xC7, }, // i = 0xB6 - { 0xB9, 0xC3, 0xC8, }, // i = 0xB7 - { 0xBA, 0xC4, 0xC9, }, // i = 0xB8 - { 0xBB, 0xC5, 0xCA, }, // i = 0xB9 - { 0xBC, 0xC5, 0xCB, }, // i = 0xBA - { 0xBD, 0xC6, 0xCC, }, // i = 0xBB - { 0xBE, 0xC7, 0xCD, }, // i = 0xBC - { 0xBF, 0xC8, 0xCD, }, // i = 0xBD - { 0xC0, 0xC9, 0xCE, }, // i = 0xBE - { 0xC1, 0xCA, 0xCF, }, // i = 0xBF - { 0xC2, 0xCB, 0xD0, }, // i = 0xC0 - { 0xC2, 0xCB, 0xD1, }, // i = 0xC1 - { 0xC3, 0xCC, 0xD2, }, // i = 0xC2 - { 0xC4, 0xCD, 0xD3, }, // i = 0xC3 - { 0xC5, 0xCE, 0xD3, }, // i = 0xC4 - { 0xC6, 0xCF, 0xD4, }, // i = 0xC5 - { 0xC7, 0xD0, 0xD5, }, // i = 0xC6 - { 0xC8, 0xD0, 0xD6, }, // i = 0xC7 - { 0xC9, 0xD1, 0xD7, }, // i = 0xC8 - { 0xCA, 0xD2, 0xD8, }, // i = 0xC9 - { 0xCB, 0xD3, 0xD9, }, // i = 0xCA - { 0xCC, 0xD4, 0xD9, }, // i = 0xCB - { 0xCC, 0xD5, 0xDA, }, // i = 0xCC - { 0xCD, 0xD6, 0xDB, }, // i = 0xCD - { 0xCE, 0xD6, 0xDC, }, // i = 0xCE - { 0xCF, 0xD7, 0xDD, }, // i = 0xCF - { 0xD0, 0xD8, 0xDE, }, // i = 0xD0 - { 0xD1, 0xD9, 0xDE, }, // i = 0xD1 - { 0xD2, 0xDA, 0xDF, }, // i = 0xD2 - { 0xD3, 0xDB, 0xE0, }, // i = 0xD3 - { 0xD4, 0xDB, 0xE1, }, // i = 0xD4 - { 0xD5, 0xDC, 0xE2, }, // i = 0xD5 - { 0xD6, 0xDD, 0xE2, }, // i = 0xD6 - { 0xD7, 0xDE, 0xE3, }, // i = 0xD7 - { 0xD8, 0xDF, 0xE4, }, // i = 0xD8 - { 0xD9, 0xE0, 0xE5, }, // i = 0xD9 - { 0xD9, 0xE0, 0xE6, }, // i = 0xDA - { 0xDA, 0xE1, 0xE6, }, // i = 0xDB - { 0xDB, 0xE2, 0xE7, }, // i = 0xDC - { 0xDC, 0xE3, 0xE8, }, // i = 0xDD - { 0xDD, 0xE4, 0xE9, }, // i = 0xDE - { 0xDE, 0xE5, 0xE9, }, // i = 0xDF - { 0xDF, 0xE5, 0xEA, }, // i = 0xE0 - { 0xE0, 0xE6, 0xEB, }, // i = 0xE1 - { 0xE1, 0xE7, 0xEC, }, // i = 0xE2 - { 0xE2, 0xE8, 0xEC, }, // i = 0xE3 - { 0xE3, 0xE9, 0xED, }, // i = 0xE4 - { 0xE4, 0xEA, 0xEE, }, // i = 0xE5 - { 0xE5, 0xEA, 0xEF, }, // i = 0xE6 - { 0xE6, 0xEB, 0xEF, }, // i = 0xE7 - { 0xE7, 0xEC, 0xF0, }, // i = 0xE8 - { 0xE8, 0xED, 0xF1, }, // i = 0xE9 - { 0xE9, 0xEE, 0xF1, }, // i = 0xEA - { 0xEA, 0xEE, 0xF2, }, // i = 0xEB - { 0xEB, 0xEF, 0xF3, }, // i = 0xEC - { 0xEC, 0xF0, 0xF3, }, // i = 0xED - { 0xED, 0xF1, 0xF4, }, // i = 0xEE - { 0xEE, 0xF2, 0xF5, }, // i = 0xEF - { 0xEF, 0xF3, 0xF5, }, // i = 0xF0 - { 0xF0, 0xF3, 0xF6, }, // i = 0xF1 - { 0xF1, 0xF4, 0xF7, }, // i = 0xF2 - { 0xF2, 0xF5, 0xF7, }, // i = 0xF3 - { 0xF3, 0xF6, 0xF8, }, // i = 0xF4 - { 0xF4, 0xF7, 0xF9, }, // i = 0xF5 - { 0xF5, 0xF7, 0xF9, }, // i = 0xF6 - { 0xF6, 0xF8, 0xFA, }, // i = 0xF7 - { 0xF7, 0xF9, 0xFA, }, // i = 0xF8 - { 0xF8, 0xFA, 0xFB, }, // i = 0xF9 - { 0xF9, 0xFA, 0xFC, }, // i = 0xFA - { 0xFA, 0xFB, 0xFC, }, // i = 0xFB - { 0xFB, 0xFC, 0xFD, }, // i = 0xFC - { 0xFC, 0xFD, 0xFD, }, // i = 0xFD - { 0xFE, 0xFE, 0xFE, }, // i = 0xFE - { 0xFF, 0xFE, 0xFE, }, // i = 0xFF -}; \ No newline at end of file diff --git a/sysmodules/rosalina/source/menus.c b/sysmodules/rosalina/source/menus.c index bf38e79c8..ae37c7851 100644 --- a/sysmodules/rosalina/source/menus.c +++ b/sysmodules/rosalina/source/menus.c @@ -224,7 +224,7 @@ void RosalinaMenu_AboutCnVer(void) Draw_DrawString(16, 16, COLOR_TITLE, "关于中文版"); u32 posY = Draw_DrawString(16, 48, COLOR_WHITE, " Luma3DS中文版基于官方最新的v13.1.2\n版本,加入中文字库,优化菜单显示,并\n支持中文金手指及金手指快捷键提示。"); - posY = Draw_DrawString(16, posY + SPACING_Y + 4, COLOR_WHITE, " 感谢开源社区为此默默贡献的开发者们\n该中文化项目同样开源在Github上\n(https://github.com/R-YaTian/Luma3DS)\n本版本开源免费,禁止商业用途!\n Cynric & R-YaTian\n 2024/08/25"); + posY = Draw_DrawString(16, posY + SPACING_Y + 4, COLOR_WHITE, " 感谢开源社区为此默默贡献的开发者们\n该中文化项目同样开源在Github上\n(https://github.com/R-YaTian/Luma3DS)\n本版本开源免费,禁止商业用途!\n Cynric & R-YaTian\n 2024/09/05"); Draw_FlushFramebuffer(); Draw_Unlock(); } diff --git a/sysmodules/rosalina/source/menus/screen_filters.c b/sysmodules/rosalina/source/menus/screen_filters.c index 324910afb..a41b0c8f1 100644 --- a/sysmodules/rosalina/source/menus/screen_filters.c +++ b/sysmodules/rosalina/source/menus/screen_filters.c @@ -101,7 +101,7 @@ static void ScreenFilterMenu_WritePolynomialColorLut(bool top, u8 curveCorrectio for (int i = 0; i <= 255; i++) { Pixel px; int inLevel = invert ? 255 - i : i; - const u8 (*tbl)[3] = curveCorrection == 2 ? ctrToSrgbTableBottom : ctrToSrgbTableTop; + const u8 (*tbl)[3] = ctrToSrgbTableTop; u8 inLevelR = curveCorrection > 0 ? tbl[inLevel][0] : inLevel; u8 inLevelG = curveCorrection > 0 ? tbl[inLevel][1] : inLevel; @@ -148,14 +148,14 @@ static void ScreenFiltersMenu_SetCct(u16 cct) static void ScreenFiltersMenu_UpdateEntries(void) { - if (topScreenFilter.colorCurveCorrection == 0 || bottomScreenFilter.colorCurveCorrection == 0) + if (topScreenFilter.colorCurveCorrection == 0) { - screenFiltersMenu.items[10].title = "调整上下屏色彩曲线为 sRGB"; - screenFiltersMenu.items[10].method = &ScreenFiltersMenu_SetSrgbColorCurves; + screenFiltersMenu.items[10].title = "[IPS推荐]增强上屏色彩"; + screenFiltersMenu.items[10].method = &ScreenFiltersMenu_SetTopScreenSrgbColorCurve; } else { - screenFiltersMenu.items[10].title = "还原上下屏色彩曲线"; + screenFiltersMenu.items[10].title = "还原上屏色彩曲线"; screenFiltersMenu.items[10].method = &ScreenFiltersMenu_RestoreColorCurves; } } @@ -183,7 +183,7 @@ Menu screenFiltersMenu = { { "[2300K] 偏暖白炽灯", METHOD, .method = &ScreenFiltersMenu_SetWarmIncandescent }, { "[1900K] 蜡烛光", METHOD, .method = &ScreenFiltersMenu_SetCandle }, { "[1200K] 火柴光", METHOD, .method = &ScreenFiltersMenu_SetEmber }, - { "调整上下屏色彩曲线为 sRGB", METHOD, .method = &ScreenFiltersMenu_SetSrgbColorCurves }, + { "[IPS推荐]增强上屏色彩", METHOD, .method = &ScreenFiltersMenu_SetTopScreenSrgbColorCurve }, { "高级设置", METHOD, .method = &ScreenFiltersMenu_AdvancedConfiguration }, {}, } @@ -297,16 +297,16 @@ DEF_CCT_SETTER(2300, WarmIncandescent) DEF_CCT_SETTER(1900, Candle) DEF_CCT_SETTER(1200, Ember) -void ScreenFiltersMenu_SetSrgbColorCurves(void) +void ScreenFiltersMenu_SetTopScreenSrgbColorCurve(void) { ScreenFiltersMenu_SetColorCurveCorrection(true, 1); - ScreenFiltersMenu_SetColorCurveCorrection(false, 2); + // Bottom screen color curve not figured out, ignore } void ScreenFiltersMenu_RestoreColorCurves(void) { ScreenFiltersMenu_SetColorCurveCorrection(true, 0); - ScreenFiltersMenu_SetColorCurveCorrection(false, 0); + // Bottom screen color curve not figured out, ignore } static void ScreenFiltersMenu_ClampFilter(ScreenFilter *filter)