fix ram watch recent
This commit is contained in:
parent
61a9f31785
commit
fd82450e42
|
@ -300,10 +300,12 @@ static CFGSTRUCT fceuconfig[] = {
|
||||||
|
|
||||||
void SaveConfig(const char *filename)
|
void SaveConfig(const char *filename)
|
||||||
{
|
{
|
||||||
|
std::string rwtemp[5];
|
||||||
//adelikat: Hacky fix for Ram Watch recent menu
|
//adelikat: Hacky fix for Ram Watch recent menu
|
||||||
for (int x = 0; x < 5; x++)
|
for (int x = 0; x < 5; x++)
|
||||||
{
|
{
|
||||||
strcpy(ramWatchRecent[x],rw_recent_files[x]);
|
rwtemp[x] = rw_recent_files[x];
|
||||||
|
ramWatchRecent[x] = (char*)rwtemp[x].c_str();
|
||||||
}
|
}
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
|
|
||||||
|
@ -321,7 +323,16 @@ void LoadConfig(const char *filename)
|
||||||
//adelikat:Hacky fix for Ram Watch recent menu
|
//adelikat:Hacky fix for Ram Watch recent menu
|
||||||
for (int x = 0; x < 5; x++)
|
for (int x = 0; x < 5; x++)
|
||||||
{
|
{
|
||||||
strncpy(rw_recent_files[x], ramWatchRecent[x]);
|
if(ramWatchRecent[x])
|
||||||
|
{
|
||||||
|
strncpy(rw_recent_files[x], ramWatchRecent[x], 1024);
|
||||||
|
free(ramWatchRecent[x]);
|
||||||
|
ramWatchRecent[x] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rw_recent_files[x][0] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ using namespace std;
|
||||||
static HMENU ramwatchmenu;
|
static HMENU ramwatchmenu;
|
||||||
static HMENU rwrecentmenu;
|
static HMENU rwrecentmenu;
|
||||||
/*static*/ HACCEL RamWatchAccels = NULL;
|
/*static*/ HACCEL RamWatchAccels = NULL;
|
||||||
char rw_recent_files[MAX_RECENT_WATCHES][1024];
|
char rw_recent_files[MAX_RECENT_WATCHES][1024] = {"","","","",""};
|
||||||
//char Watch_Dir[1024]="";
|
//char Watch_Dir[1024]="";
|
||||||
bool RWfileChanged = false; //Keeps track of whether the current watch file has been changed, if so, ramwatch will prompt to save changes
|
bool RWfileChanged = false; //Keeps track of whether the current watch file has been changed, if so, ramwatch will prompt to save changes
|
||||||
bool AutoRWLoad = false; //Keeps track of whether Auto-load is checked
|
bool AutoRWLoad = false; //Keeps track of whether Auto-load is checked
|
||||||
|
|
Loading…
Reference in New Issue