- fixed bug where trying to save two savestates in a row would load the second one instead of saving it
- fixed movie recording which was totally broken by my last checkin - fixed some minor snddx buffer size problems (the default size might need to be increased now, but if so, someone else should do it, since it works fine for me as is.)
This commit is contained in:
parent
b7daefd0f9
commit
4915fc6978
|
@ -176,7 +176,7 @@ MovieData::MovieData()
|
||||||
|
|
||||||
void MovieData::truncateAt(int frame)
|
void MovieData::truncateAt(int frame)
|
||||||
{
|
{
|
||||||
if(records.size() < frame)
|
if(records.size() > frame)
|
||||||
records.resize(frame);
|
records.resize(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -727,6 +727,8 @@ void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, s
|
||||||
assert(nds.touchX == input.touch.touchX && nds.touchY == input.touch.touchY);
|
assert(nds.touchX == input.touch.touchX && nds.touchY == input.touch.touchY);
|
||||||
assert((mr.touch.x << 4) == nds.touchX && (mr.touch.y << 4) == nds.touchY);
|
assert((mr.touch.x << 4) == nds.touchX && (mr.touch.y << 4) == nds.touchY);
|
||||||
|
|
||||||
|
currMovieData.truncateAt(currFrameCounter);
|
||||||
|
|
||||||
mr.dump(&currMovieData, osRecordingMovie,currMovieData.records.size());
|
mr.dump(&currMovieData, osRecordingMovie,currMovieData.records.size());
|
||||||
currMovieData.records.push_back(mr);
|
currMovieData.records.push_back(mr);
|
||||||
|
|
||||||
|
@ -864,9 +866,6 @@ bool mov_loadstate(EMUFILE* fp, int size)
|
||||||
|
|
||||||
if(!movie_readonly)
|
if(!movie_readonly)
|
||||||
{
|
{
|
||||||
////truncate before we copy, just to save some time
|
|
||||||
//tempMovieData.truncateAt(currFrameCounter); // disabled because this can really screw things up and shouldn't usually be faster
|
|
||||||
|
|
||||||
currMovieData = tempMovieData;
|
currMovieData = tempMovieData;
|
||||||
currMovieData.rerecordCount = currRerecordCount;
|
currMovieData.rerecordCount = currRerecordCount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2806,7 +2806,6 @@ void CloseRom()
|
||||||
NDS_Reset();
|
NDS_Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO - async key state? for real?
|
|
||||||
int GetModifiers(int key)
|
int GetModifiers(int key)
|
||||||
{
|
{
|
||||||
int modifiers = 0;
|
int modifiers = 0;
|
||||||
|
@ -2814,9 +2813,9 @@ int GetModifiers(int key)
|
||||||
if (key == VK_MENU || key == VK_CONTROL || key == VK_SHIFT)
|
if (key == VK_MENU || key == VK_CONTROL || key == VK_SHIFT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(GetAsyncKeyState(VK_MENU )&0x8000) modifiers |= CUSTKEY_ALT_MASK;
|
if(GetKeyState(VK_MENU )&0x8000) modifiers |= CUSTKEY_ALT_MASK;
|
||||||
if(GetAsyncKeyState(VK_CONTROL)&0x8000) modifiers |= CUSTKEY_CTRL_MASK;
|
if(GetKeyState(VK_CONTROL)&0x8000) modifiers |= CUSTKEY_CTRL_MASK;
|
||||||
if(GetAsyncKeyState(VK_SHIFT )&0x8000) modifiers |= CUSTKEY_SHIFT_MASK;
|
if(GetKeyState(VK_SHIFT )&0x8000) modifiers |= CUSTKEY_SHIFT_MASK;
|
||||||
return modifiers;
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,8 @@ int SNDDXInit(int buffersize)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
soundbufsize = buffersize * 2 * 2;
|
soundbufsize = buffersize * 2; // caller already multiplies buffersize by 2
|
||||||
|
soundoffset = 0;
|
||||||
|
|
||||||
memset(&wfx, 0, sizeof(wfx));
|
memset(&wfx, 0, sizeof(wfx));
|
||||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||||
|
|
Loading…
Reference in New Issue