mirror of https://github.com/snes9xgit/snes9x.git
Remove S9xChooseMovieFilename
This is integration of the frontend with the core. Disable the button mappings that use it. The frontend should implement on its own.
This commit is contained in:
parent
f04f1bbe44
commit
e705e71a97
12
controls.cpp
12
controls.cpp
|
@ -2412,15 +2412,15 @@ void S9xApplyCommand (s9xcommand_t cmd, int16 data1, int16 data2)
|
|||
break;
|
||||
|
||||
case BeginRecordingMovie:
|
||||
if (S9xMovieActive())
|
||||
S9xMovieStop(FALSE);
|
||||
S9xMovieCreate(S9xChooseMovieFilename(FALSE), 0xFF, MOVIE_OPT_FROM_RESET, NULL, 0);
|
||||
// if (S9xMovieActive())
|
||||
// S9xMovieStop(FALSE);
|
||||
// S9xMovieCreate(S9xChooseMovieFilename(FALSE), 0xFF, MOVIE_OPT_FROM_RESET, NULL, 0);
|
||||
break;
|
||||
|
||||
case LoadMovie:
|
||||
if (S9xMovieActive())
|
||||
S9xMovieStop(FALSE);
|
||||
S9xMovieOpen(S9xChooseMovieFilename(TRUE), FALSE);
|
||||
// if (S9xMovieActive())
|
||||
// S9xMovieStop(FALSE);
|
||||
// S9xMovieOpen(S9xChooseMovieFilename(TRUE), FALSE);
|
||||
break;
|
||||
|
||||
case EndRecordingMovie:
|
||||
|
|
|
@ -298,10 +298,6 @@
|
|||
<p>
|
||||
Called when Snes9x wants to know the directory <code>dirtype</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>.
|
||||
</p>
|
||||
<h3><code>const char *S9xBasename (const char *path)</code></h3>
|
||||
<p>
|
||||
Called when Snes9x wants to know the name of the ROM image. Typically, extract the filename from <code>path</code> and return it.
|
||||
|
|
|
@ -16,19 +16,6 @@
|
|||
|
||||
static char buf[PATH_MAX];
|
||||
|
||||
const char *S9xChooseMovieFilename(bool8 read_only)
|
||||
{
|
||||
static char path[PATH_MAX];
|
||||
|
||||
if (!gui_config->rom_loaded)
|
||||
return "";
|
||||
|
||||
auto filename = top_level->open_movie_dialog(read_only);
|
||||
strcpy(path, filename.c_str());
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
const char *S9xGetFilenameInc(const char *e, enum s9x_getdirtype dirtype)
|
||||
{
|
||||
static char filename[PATH_MAX + 1];
|
||||
|
|
|
@ -220,7 +220,7 @@ void Snes9xWindow::connect_signals()
|
|||
if (S9xMovieActive())
|
||||
S9xMovieStop(false);
|
||||
|
||||
S9xMovieOpen(S9xChooseMovieFilename(true), false);
|
||||
S9xMovieOpen(open_movie_dialog(true).c_str(), false);
|
||||
});
|
||||
|
||||
get_object<Gtk::MenuItem>("stop_recording_item")->signal_activate().connect([&] {
|
||||
|
@ -236,7 +236,7 @@ void Snes9xWindow::connect_signals()
|
|||
if (S9xMovieActive())
|
||||
S9xMovieStop(false);
|
||||
|
||||
S9xMovieCreate(S9xChooseMovieFilename(false), 0xFF, MOVIE_OPT_FROM_RESET, nullptr, 0);
|
||||
S9xMovieCreate(open_movie_dialog(false).c_str(), 0xFF, MOVIE_OPT_FROM_RESET, nullptr, 0);
|
||||
});
|
||||
|
||||
get_object<Gtk::MenuItem>("cheats_item")->signal_activate().connect([&] {
|
||||
|
@ -631,7 +631,6 @@ void Snes9xWindow::open_multicart_dialog()
|
|||
|
||||
std::string Snes9xWindow::open_movie_dialog(bool readonly)
|
||||
{
|
||||
|
||||
this->pause_from_focus_change();
|
||||
|
||||
std::string title;
|
||||
|
|
|
@ -2138,7 +2138,6 @@ void S9xParseArg(char**, int&, int) {}
|
|||
void S9xExit() {}
|
||||
bool S9xPollPointer(unsigned int, short*, short*) { return false; }
|
||||
|
||||
const char *S9xChooseMovieFilename(unsigned char) { return NULL; }
|
||||
void S9xMessage(int type, int, const char* s)
|
||||
{
|
||||
if (!log_cb) return;
|
||||
|
|
|
@ -365,11 +365,6 @@ const char * S9xGetFilenameInc (const char *inExt, enum s9x_getdirtype dirtype)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
const char * S9xChooseMovieFilename (bool8 read_only)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
bool8 S9xOpenSnapshotFile (const char *fname, bool8 read_only, STREAM *file)
|
||||
{
|
||||
if (read_only)
|
||||
|
|
1
movie.h
1
movie.h
|
@ -48,7 +48,6 @@ int S9xMovieGetInfo (const char *, struct MovieInfo *);
|
|||
void S9xMovieStop (bool8);
|
||||
void S9xMovieToggleRecState (void);
|
||||
void S9xMovieToggleFrameDisplay (void);
|
||||
const char * S9xChooseMovieFilename (bool8);
|
||||
|
||||
// methods used by the emulation
|
||||
void S9xMovieInit (void);
|
||||
|
|
|
@ -588,25 +588,6 @@ const char * S9xBasename (const char *f)
|
|||
return (f);
|
||||
}
|
||||
|
||||
const char * S9xChooseMovieFilename (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.smv", fname);
|
||||
sprintf(title, "Choose movie %s filename", read_only ? "playback" : "record");
|
||||
|
||||
S9xSetSoundMute(TRUE);
|
||||
filename = S9xSelectFilename(s, S9xGetDirectory(HOME_DIR), "smv", title);
|
||||
S9xSetSoundMute(FALSE);
|
||||
|
||||
return (filename);
|
||||
}
|
||||
|
||||
bool8 S9xOpenSnapshotFile (const char *filename, bool8 read_only, STREAM *file)
|
||||
{
|
||||
char s[PATH_MAX + 1];
|
||||
|
|
|
@ -10843,13 +10843,6 @@ void S9xHandlePortCommand(s9xcommand_t cmd, int16 data1, int16 data2)
|
|||
return;
|
||||
}
|
||||
|
||||
// NYI
|
||||
const char *S9xChooseMovieFilename (bool8 read_only)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const char * S9xStringInput(const char *msg)
|
||||
{
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue