From 84702f87d86a854c328d91d29b28a663dfe68617 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 1 Jul 2013 14:00:34 -0400 Subject: [PATCH 1/4] Windows GUI: Add option to disable texture filtering to Options menu, since it's missing. --- Windows/WndMainWindow.cpp | 3 +++ Windows/ppsspp.rc | Bin 43364 -> 43508 bytes Windows/resource.h | Bin 24654 -> 24742 bytes 3 files changed, 3 insertions(+) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index b486bbd60..fc0fe9bcc 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -744,6 +744,9 @@ namespace MainWindow case ID_OPTIONS_USEVBO: g_Config.bUseVBO = !g_Config.bUseVBO; break; + case ID_OPTIONS_TEXTUREFILTERING_OFF: + setTexFiltering(1); + break; case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(2) ; break; diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 1b7dfc0b88168548b8467d1e10f09777d2532218..a4dca8df392a57168715637166745df60b7ec625 100644 GIT binary patch delta 44 zcmaEIiRsH_rVT}%lYP34CI_^L@rE$CGDI+hFoZG$F}O~i*d;o7RX5k>uueV&0E@N{ A*#H0l delta 14 Wcmexznd!+TrVT}%o0+;k$pZjALkE2T diff --git a/Windows/resource.h b/Windows/resource.h index e75bbf8fa674fb57f9c2e8491ebbc2d27440f772..2a47cacfed57c88aa8ca5063e50baab9fb7c141c 100644 GIT binary patch delta 94 zcmV-k0HOcRzyYSg0kD)@4O9R{09XK20961|07a9bToVUh08ao$07jF&Tql!|3lNi( zTq=`lUmlat5EPU0Tr87>T_Tf!3KEl4T`CDQ05AYC0673MlVL3#lMn&~v#MRB0+Qw( A2><{9 delta 58 zcmV-A0LA~N!2!;|0kD)@lk!|DlgwEPlg3;elR#ZMlbk*XlgM8flQ1 Date: Mon, 1 Jul 2013 15:01:18 -0400 Subject: [PATCH 2/4] Add ID_OPTIONS_TEXTUREFILTERING_OFF to the int array. Thanks to @unknownbrackets for pointing it out. --- Windows/WndMainWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index fc0fe9bcc..ec0499d5d 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -956,6 +956,7 @@ namespace MainWindow } static const int texfilteringitems[] = { + ID_OPTIONS_TEXTUREFILTERING_OFF, ID_OPTIONS_NEARESTFILTERING, ID_OPTIONS_LINEARFILTERING, ID_OPTIONS_LINEARFILTERING_CG, From 2430324c40eed360f6b7436cff9fa4106defd179 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 1 Jul 2013 15:42:45 -0400 Subject: [PATCH 3/4] Rename "Off" to "Auto", and fix buggy menu. --- Windows/WndMainWindow.cpp | 13 ++++++++----- Windows/ppsspp.rc | Bin 43508 -> 43512 bytes 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index ec0499d5d..7673b323d 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -744,8 +744,8 @@ namespace MainWindow case ID_OPTIONS_USEVBO: g_Config.bUseVBO = !g_Config.bUseVBO; break; - case ID_OPTIONS_TEXTUREFILTERING_OFF: - setTexFiltering(1); + case ID_OPTIONS_TEXTUREFILTERING_AUTO: + setTexFiltering(0); break; case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(2) ; @@ -956,13 +956,16 @@ namespace MainWindow } static const int texfilteringitems[] = { - ID_OPTIONS_TEXTUREFILTERING_OFF, + ID_OPTIONS_TEXTUREFILTERING_AUTO, ID_OPTIONS_NEARESTFILTERING, ID_OPTIONS_LINEARFILTERING, ID_OPTIONS_LINEARFILTERING_CG, }; - for (int i = 0; i < 3; i++) { - CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == g_Config.iTexFiltering-2) ? MF_CHECKED : MF_UNCHECKED)); + for (int i = 0; i < 4; i++) { + if(i != 0) + CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == g_Config.iTexFiltering-1) ? MF_CHECKED : MF_UNCHECKED)); + else + CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == g_Config.iTexFiltering) ? MF_CHECKED : MF_UNCHECKED)); } UpdateCommands(); diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index a4dca8df392a57168715637166745df60b7ec625..b123d2e19cf14ced1c719eebf51031a5f884a7ac 100644 GIT binary patch delta 42 xcmexznd!%6rVT}%?2Zhj3?&TtlN0leCx4hEFnL#}5>PCZA%wwy^TSSI1ps{O5G4Qr delta 36 scmexynd!@ArVT}%lOJ>&O%7-go4lt}iPfLMjlpelV5j0{wysa|07Y02s{jB1 From 7ab2da6dfc345910cc3954c3d64d6c2c4fa24ba5 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 1 Jul 2013 16:03:43 -0400 Subject: [PATCH 4/4] Simplify loop. --- Windows/WndMainWindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 7673b323d..9cfeacf34 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -962,10 +962,8 @@ namespace MainWindow ID_OPTIONS_LINEARFILTERING_CG, }; for (int i = 0; i < 4; i++) { - if(i != 0) - CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == g_Config.iTexFiltering-1) ? MF_CHECKED : MF_UNCHECKED)); - else - CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == g_Config.iTexFiltering) ? MF_CHECKED : MF_UNCHECKED)); + int texFilterLevel = i > 0? (g_Config.iTexFiltering - 1) : g_Config.iTexFiltering; + CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i == texFilterLevel) ? MF_CHECKED : MF_UNCHECKED)); } UpdateCommands();