* fixed savestates filenaming bug when working with a movie
* updated docs [[Split portion of a mixed commit.]]
This commit is contained in:
parent
a2fb69118b
commit
96de43061d
|
@ -1,3 +1,4 @@
|
|||
30-Aug-2012 - AnS - fixed savestates filenaming bug when working with a movie
|
||||
29-Aug-2012 - AnS - added "Force Grayscale" checkbox to Palette config
|
||||
26-Aug-2012 - AnS - Taseditor: History Log highlights items related to current item
|
||||
25-Aug-2012 - AnS - Taseditor: fixed AdjustLag feature and changed fm3 version to v2
|
||||
|
|
Binary file not shown.
24
src/file.cpp
24
src/file.cpp
|
@ -566,7 +566,7 @@ std::string FCEU_MakeFName(int type, int id1, const char *cd1)
|
|||
char ret[FILENAME_MAX] = "";
|
||||
struct stat tmpstat;
|
||||
std::string mfnString;
|
||||
const char* mfn;
|
||||
const char* mfn; // the movie filename
|
||||
|
||||
switch(type)
|
||||
{
|
||||
|
@ -582,20 +582,22 @@ std::string FCEU_MakeFName(int type, int id1, const char *cd1)
|
|||
break;
|
||||
case FCEUMKF_STATE:
|
||||
{
|
||||
if (bindSavestate) mfnString = GetMfn();
|
||||
else mfnString = "";
|
||||
|
||||
if (mfnString.length() < 60) //This caps the movie filename length before adding it to the savestate filename.
|
||||
mfn = mfnString.c_str(); //This helps prevent possible crashes from savestate filenames of excessive length.
|
||||
|
||||
if (bindSavestate)
|
||||
mfnString = GetMfn();
|
||||
else
|
||||
mfnString = "";
|
||||
|
||||
if (mfnString.length() <= MAX_MOVIEFILENAME_LEN)
|
||||
{
|
||||
std::string mfnStringTemp = mfnString.substr(0,60);
|
||||
mfn = mfnStringTemp.c_str(); //mfn is the movie filename
|
||||
mfn = mfnString.c_str();
|
||||
} else
|
||||
{
|
||||
//This caps the movie filename length before adding it to the savestate filename.
|
||||
//This helps prevent possible crashes from savestate filenames of excessive length.
|
||||
mfnString = mfnString.substr(0, MAX_MOVIEFILENAME_LEN);
|
||||
mfn = mfnString.c_str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(odirs[FCEUIOD_STATES])
|
||||
{
|
||||
sprintf(ret,"%s"PSS"%s%s.fc%d",odirs[FCEUIOD_STATES],FileBase,mfn,id1);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _FCEU_FILE_H_
|
||||
#define _FCEU_FILE_H_
|
||||
|
||||
#define MAX_MOVIEFILENAME_LEN 80
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "types.h"
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue