MCPcopy Create free account
hub / github.com/TASEmulators/fceux / FCEUI_SetRegion

Function FCEUI_SetRegion

src/fceu.cpp:1180–1225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180void FCEUI_SetRegion(int region, int notify)
1181{
1182 switch (region) {
1183 case 0: // NTSC
1184 normalscanlines = 240;
1185 pal_emulation = 0;
1186 dendy = 0;
1187
1188 if (notify)
1189 {
1190 FCEU_DispMessage("NTSC mode set", 0);
1191 FCEUI_printf("NTSC mode set\n");
1192 }
1193 break;
1194 case 1: // PAL
1195 normalscanlines = 240;
1196 pal_emulation = 1;
1197 dendy = 0;
1198
1199 if (notify)
1200 {
1201 FCEU_DispMessage("PAL mode set", 0);
1202 FCEUI_printf("PAL mode set\n");
1203 }
1204 break;
1205 case 2: // Dendy
1206 normalscanlines = 290;
1207 pal_emulation = 0;
1208 dendy = 1;
1209
1210 if (notify)
1211 {
1212 FCEU_DispMessage("Dendy mode set", 0);
1213 FCEUI_printf("Dendy mode set\n");
1214 }
1215 break;
1216 }
1217 normalscanlines += newppu;
1218 totalscanlines = normalscanlines + (overclock_enabled ? postrenderscanlines : 0);
1219 FCEUI_SetVidSystem(pal_emulation);
1220 RefreshThrottleFPS();
1221#ifdef __WIN_DRIVER__
1222 UpdateCheckedMenuItems();
1223 PushCurrentVideoSettings();
1224#endif
1225}
1226
1227//Enable or disable Game Genie option.
1228void FCEUI_SetGameGenie(bool a) {

Callers 9

AppWndProcFunction · 0.85
mainFunction · 0.85
LoadGameFunction · 0.85
regionChangedMethod · 0.85
UpdateEMUCoreFunction · 0.85
setRegionMethod · 0.85
setRegionFunction · 0.85
UpdateEMUCoreFunction · 0.85
LoadGameFunction · 0.85

Calls 5

FCEU_DispMessageFunction · 0.85
FCEUI_SetVidSystemFunction · 0.85
UpdateCheckedMenuItemsFunction · 0.85
PushCurrentVideoSettingsFunction · 0.85
RefreshThrottleFPSFunction · 0.50

Tested by

no test coverage detected