Skip to content

Commit

Permalink
Remove S9xChooseFilename
Browse files Browse the repository at this point in the history
This is integration of the frontend with the core. Disable
the snapshot button mappings that use it. Any frontend should
implement those port commands its own.
  • Loading branch information
bearoso committed Aug 7, 2020
1 parent 063b3a9 commit f04f1bb
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 43 deletions.
2 changes: 0 additions & 2 deletions controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,11 +2269,9 @@ void S9xApplyCommand (s9xcommand_t cmd, int16 data1, int16 data2)
break;

case LoadFreezeFile:
S9xUnfreezeGame(S9xChooseFilename(TRUE));
break;

case SaveFreezeFile:
S9xFreezeGame(S9xChooseFilename(FALSE));
break;

case LoadOopsFile:
Expand Down
1 change: 0 additions & 1 deletion display.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const char * S9xStringInput (const char *);
const char * S9xGetDirectory (enum s9x_getdirtype);
const char * S9xGetFilename (const char *, enum s9x_getdirtype);
const char * S9xGetFilenameInc (const char *, enum s9x_getdirtype);
const char * S9xChooseFilename (bool8);
const char * S9xBasename (const char *);

// Routines the port has to implement if it uses command-line
Expand Down
4 changes: 0 additions & 4 deletions docs/porting.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,6 @@ <h3><code>const char *S9xGetDirectory (enum s9x_getdirtype dirtype)</code></h3>
<p>
Called when Snes9x wants to know the directory <code>dirtype</code>.
</p>
<h3><code>const char *S9xChooseFilename (bool8 read_only)</code></h3>
<p>
If your port can match Snes9x's built-in <code>LoadFreezeFile</code>/<code>SaveFreezeFile</code> command (see <code>controls.cpp</code>), you may choose to use this function. Otherwise return <code>NULL</code>.
</p>
<h3><code>const char *S9xChooseMovieFilename (bool8 read_only)</code></h3>
<p>
If your port can match Snes9x's built-in <code>BeginRecordingMovie</code>/<code>LoadMovie</code> command (see <code>controls.cpp</code>), you may choose to use this function. Otherwise return <code>NULL</code>.
Expand Down
5 changes: 0 additions & 5 deletions gtk/src/gtk_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ const char *S9xChooseMovieFilename(bool8 read_only)
return path;
}

const char *S9xChooseFilename(bool8 read_only)
{
return "";
}

const char *S9xGetFilenameInc(const char *e, enum s9x_getdirtype dirtype)
{
static char filename[PATH_MAX + 1];
Expand Down
1 change: 0 additions & 1 deletion libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,6 @@ const char* S9xGetDirectory(s9x_getdirtype type)
return "";
}
void S9xInitInputDevices() {}
const char* S9xChooseFilename(unsigned char) { return ""; }
void S9xHandlePortCommand(s9xcommand_t, short, short) {}
bool S9xPollButton(unsigned int, bool*) { return false; }
void S9xToggleSoundChannel(int) {}
Expand Down
5 changes: 0 additions & 5 deletions macosx/mac-file.mm
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,6 @@ static void AddFolderIcon (NSURL *fref, const char *folderName)
return (NULL);
}

const char * S9xChooseFilename (bool8 read_only)
{
return (NULL);
}

const char * S9xChooseMovieFilename (bool8 read_only)
{
return (NULL);
Expand Down
19 changes: 0 additions & 19 deletions unix/unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,25 +588,6 @@ const char * S9xBasename (const char *f)
return (f);
}

const char * S9xChooseFilename (bool8 read_only)
{
char s[PATH_MAX + 1];
char drive[_MAX_DRIVE + 1], dir[_MAX_DIR + 1], fname[_MAX_FNAME + 1], ext[_MAX_EXT + 1];

const char *filename;
char title[64];

_splitpath(Memory.ROMFilename, drive, dir, fname, ext);
snprintf(s, PATH_MAX + 1, "%s.frz", fname);
sprintf(title, "%s snapshot filename", read_only ? "Select load" : "Choose save");

S9xSetSoundMute(TRUE);
filename = S9xSelectFilename(s, S9xGetDirectory(SNAPSHOT_DIR), "frz", title);
S9xSetSoundMute(FALSE);

return (filename);
}

const char * S9xChooseMovieFilename (bool8 read_only)
{
char s[PATH_MAX + 1];
Expand Down
6 changes: 0 additions & 6 deletions win32/wsnes9x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10843,12 +10843,6 @@ void S9xHandlePortCommand(s9xcommand_t cmd, int16 data1, int16 data2)
return;
}

// NYI
const char *S9xChooseFilename (bool8 read_only)
{
return NULL;
}

// NYI
const char *S9xChooseMovieFilename (bool8 read_only)
{
Expand Down

0 comments on commit f04f1bb

Please sign in to comment.