mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-24 03:29:22 +01:00
minor tweaks
This commit is contained in:
parent
26cfad4405
commit
c7aa8f2bd8
@ -32,6 +32,8 @@
|
||||
#define SCROLL_LOOP_DELAY 3
|
||||
#define PAGESIZE 8
|
||||
#define SAVELISTSIZE 6
|
||||
#define MAX_SAVES 20
|
||||
#define MAX_OPTIONS 30
|
||||
|
||||
typedef void (*UpdateCallback)(void * e);
|
||||
|
||||
@ -351,8 +353,8 @@ class GuiFileBrowser : public GuiElement
|
||||
|
||||
typedef struct _optionlist {
|
||||
int length;
|
||||
char name[150][50];
|
||||
char value[150][50];
|
||||
char name[MAX_OPTIONS][150];
|
||||
char value[MAX_OPTIONS][150];
|
||||
} OptionList;
|
||||
|
||||
class GuiOptionBrowser : public GuiElement
|
||||
@ -406,11 +408,11 @@ class GuiOptionBrowser : public GuiElement
|
||||
|
||||
typedef struct _savelist {
|
||||
int length;
|
||||
char filename[20][255];
|
||||
GuiImageData * previewImg[20];
|
||||
char date[20][50];
|
||||
char time[10][50];
|
||||
int type[20];
|
||||
char filename[MAX_SAVES][256];
|
||||
GuiImageData * previewImg[MAX_SAVES];
|
||||
char date[MAX_SAVES][20];
|
||||
char time[MAX_SAVES][10];
|
||||
int type[MAX_SAVES];
|
||||
int files[2][100];
|
||||
} SaveList;
|
||||
|
||||
|
@ -168,11 +168,12 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(state == STATE_SELECTED)
|
||||
else
|
||||
{
|
||||
state = STATE_DEFAULT;
|
||||
if(state == STATE_SELECTED)
|
||||
state = STATE_DEFAULT;
|
||||
|
||||
if(effectsOver && !effects)
|
||||
if(effectTarget == effectTargetOver && effectAmount == effectAmountOver)
|
||||
{
|
||||
// initiate effects (in reverse)
|
||||
effects = effectsOver;
|
||||
|
@ -1463,7 +1463,7 @@ static int MenuGameSaves(int action)
|
||||
if(saves.type[j] != -1)
|
||||
{
|
||||
int n = -1;
|
||||
char tmp[300];
|
||||
char tmp[256];
|
||||
strncpy(tmp, browserList[i].filename, 255);
|
||||
tmp[len2-4] = 0;
|
||||
|
||||
@ -1472,7 +1472,7 @@ static int MenuGameSaves(int action)
|
||||
else if(len2 - len == 6)
|
||||
n = atoi(&tmp[len2-6]);
|
||||
|
||||
if(n > 0 && n < 100)
|
||||
if(n > 0 && n < MAX_SAVES)
|
||||
saves.files[saves.type[j]][n] = 1;
|
||||
|
||||
strncpy(saves.filename[j], browserList[i].filename, 255);
|
||||
@ -1486,20 +1486,7 @@ static int MenuGameSaves(int action)
|
||||
|
||||
AllocSaveBuffer();
|
||||
if(LoadFile(scrfile, GCSettings.SaveMethod, SILENT))
|
||||
{
|
||||
saves.previewImg[j] = new GuiImageData(savebuffer);
|
||||
}
|
||||
/*char scrfile2[1024];
|
||||
sprintf(scrfile, "%s/%s.png", GCSettings.SaveFolder, tmp);
|
||||
sprintf(scrfile2, "%s/resave/%s.png", GCSettings.SaveFolder, tmp);
|
||||
|
||||
AllocSaveBuffer();
|
||||
int scrsize = LoadFile(scrfile, GCSettings.SaveMethod, SILENT);
|
||||
if(scrsize > 0)
|
||||
{
|
||||
//saves.previewImg[j] = new GuiImageData(savebuffer);
|
||||
SaveFile(scrfile2, scrsize, GCSettings.SaveMethod, SILENT);
|
||||
}*/
|
||||
FreeSaveBuffer();
|
||||
}
|
||||
strftime(saves.date[j], 20, "%a %b %d", &browserList[j].mtime);
|
||||
|
Loading…
Reference in New Issue
Block a user