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

Function iNESGI

src/ines.cpp:94–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void iNESGI(GI h) { //bbit edited: removed static keyword
95 switch (h) {
96 case GI_RESETSAVE:
97 FCEU_ClearGameSave(&iNESCart);
98 break;
99
100 case GI_RESETM2:
101 if (iNESCart.Reset)
102 iNESCart.Reset();
103 break;
104 case GI_POWER:
105 iNES_ExecPower();
106 break;
107 case GI_CLOSE:
108 {
109 FCEU_SaveGameSave(&iNESCart);
110 if (iNESCart.Close)
111 iNESCart.Close();
112 if (ROM) {
113 FCEU_free(ROM);
114 ROM = NULL;
115 }
116 if (VROM) {
117 FCEU_free(VROM);
118 VROM = NULL;
119 }
120 if (trainerpoo) {
121 free(trainerpoo);
122 trainerpoo = NULL;
123 }
124 if (ExtraNTARAM) {
125 free(ExtraNTARAM);
126 ExtraNTARAM = NULL;
127 }
128 }
129 break;
130 }
131}
132
133uint32 iNESGameCRC32 = 0;
134

Callers

nothing calls this directly

Calls 4

FCEU_ClearGameSaveFunction · 0.85
iNES_ExecPowerFunction · 0.85
FCEU_SaveGameSaveFunction · 0.85
FCEU_freeFunction · 0.85

Tested by

no test coverage detected