Commit 8b76b530 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Stub out cheats for now for MSVC until this issue is properly fixed

parent 705ae641
Pipeline #2496 passed with stages
in 2 minutes and 38 seconds
...@@ -538,16 +538,15 @@ void retro_cheat_reset(void) ...@@ -538,16 +538,15 @@ void retro_cheat_reset(void)
void retro_cheat_set(unsigned index, bool enable, const char* in_code) void retro_cheat_set(unsigned index, bool enable, const char* in_code)
{ {
/* TODO/FIXME - MSVC error C2057: expected constant expression -
* see clean_code[strlen(in_code)];
*/
#ifndef _MSC_VER
uint32 address; uint32 address;
uint8 byte; uint8 byte;
char clean_code[strlen(in_code)]; char clean_code[strlen(in_code)];
int j =0; int j =0;
unsigned i; unsigned i;
/* TODO/FIXME - MSVC error C2057: expected constant expression -
* see clean_code[strlen(in_code)];
*/
for (i = 0; i < strlen(in_code); i++) for (i = 0; i < strlen(in_code); i++)
{ {
switch (in_code[i]) switch (in_code[i])
...@@ -576,6 +575,7 @@ void retro_cheat_set(unsigned index, bool enable, const char* in_code) ...@@ -576,6 +575,7 @@ void retro_cheat_set(unsigned index, bool enable, const char* in_code)
else if ( S9xGameGenieToRaw(clean_code, &address, &byte) == NULL) else if ( S9xGameGenieToRaw(clean_code, &address, &byte) == NULL)
S9xAddCheat(true, true, address, byte); S9xAddCheat(true, true, address, byte);
/* else, silently ignore */ /* else, silently ignore */
#endif
} }
bool retro_load_game(const struct retro_game_info *game) bool retro_load_game(const struct retro_game_info *game)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment