mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Convert all of the checkbox loops to use ARRAY_SIZE instead of magic numbers.
This commit is contained in:
parent
883db82255
commit
c7a82b59e9
@ -1209,7 +1209,7 @@ namespace MainWindow
|
||||
ID_OPTIONS_SCREEN3X,
|
||||
ID_OPTIONS_SCREEN4X,
|
||||
};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(zoomitems); i++) {
|
||||
CheckMenuItem(menu, zoomitems[i], MF_BYCOMMAND | ((i == g_Config.iWindowZoom - 1) ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
@ -1220,7 +1220,7 @@ namespace MainWindow
|
||||
ID_TEXTURESCALING_4X,
|
||||
ID_TEXTURESCALING_5X,
|
||||
};
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(texscalingitems); i++) {
|
||||
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iTexScalingLevel - 1) ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
@ -1230,7 +1230,7 @@ namespace MainWindow
|
||||
ID_TEXTURESCALING_BICUBIC,
|
||||
ID_TEXTURESCALING_HYBRID_BICUBIC,
|
||||
};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(texscalingtypeitems); i++) {
|
||||
CheckMenuItem(menu, texscalingtypeitems[i], MF_BYCOMMAND | ((i == g_Config.iTexScalingType) ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
@ -1240,7 +1240,7 @@ namespace MainWindow
|
||||
ID_OPTIONS_LINEARFILTERING,
|
||||
ID_OPTIONS_LINEARFILTERING_CG,
|
||||
};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(texfilteringitems); i++) {
|
||||
CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ( (i + 1) == g_Config.iTexFiltering )? MF_CHECKED : MF_UNCHECKED);
|
||||
}
|
||||
|
||||
@ -1250,7 +1250,7 @@ namespace MainWindow
|
||||
ID_OPTIONS_READFBOTOMEMORYCPU,
|
||||
ID_OPTIONS_READFBOTOMEMORYGPU,
|
||||
};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(renderingmode); i++) {
|
||||
CheckMenuItem(menu, renderingmode[i], MF_BYCOMMAND | ( i == g_Config.iRenderingMode )? MF_CHECKED : MF_UNCHECKED);
|
||||
}
|
||||
|
||||
@ -1266,7 +1266,7 @@ namespace MainWindow
|
||||
ID_OPTIONS_FRAMESKIP_8,
|
||||
ID_OPTIONS_FRAMESKIP_9,
|
||||
};
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(frameskipping); i++) {
|
||||
CheckMenuItem(menu, frameskipping[i], MF_BYCOMMAND | ( i == g_Config.iFrameSkip )? MF_CHECKED : MF_UNCHECKED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user