Revered Misc.cpp and vssprintf.cpp from r904. See r904 comments for details.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@911 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-04-04 19:50:34 +00:00
parent 47759b0a46
commit 7cf7a118b7
3 changed files with 135 additions and 130 deletions

View File

@ -420,7 +420,7 @@ char *ParseLang(char *id) {
char* mystrlwr( char* string )
{
assert( string != NULL );
while ( 0 != ( *string++ = (char)tolower( *string ) ) ) ;
while ( 0 != ( *string++ = (char)tolower( *string ) ) );
return string;
}
@ -495,7 +495,8 @@ void ProcessFKeys(int fkey, struct KeyModifiers *keymod)
{
assert(fkey >= 1 && fkey <= 12 );
switch(fkey) {
switch(fkey)
{
case 1:
try
{
@ -569,7 +570,8 @@ void ProcessFKeys(int fkey, struct KeyModifiers *keymod)
break;
case 9: //gsdx "on the fly" renderer switching
if (!renderswitch) {
if (!renderswitch)
{
StateRecovery::MakeGsOnly();
g_EmulationInProgress = false;
CloseGS();
@ -577,7 +579,8 @@ void ProcessFKeys(int fkey, struct KeyModifiers *keymod)
StateRecovery::Recover();
HostGui::BeginExecution(); //also sets g_EmulationInProgress to true later
}
else {
else
{
StateRecovery::MakeGsOnly();
g_EmulationInProgress = false;
CloseGS();
@ -599,30 +602,33 @@ void ProcessFKeys(int fkey, struct KeyModifiers *keymod)
GSprintf(10,"Logging Disabled.");
break;
case 11:
if( mtgsThread != NULL ) {
if( mtgsThread != NULL )
{
Console::Notice( "Cannot make gsstates in MTGS mode" );
}
else
{
string Text;
if( strgametitle[0] != 0 ) {
if( strgametitle[0] != 0 )
{
// only take the first two words
char name[256], *tok;
string gsText;
tok = strtok(strgametitle, " ");
sprintf(name, "%s_", mystrlwr(tok));
tok = strtok(NULL, " ");
if( tok != NULL ) strcat(name, tok);
ssprintf( gsText, "%s.%d.gs", name, StatesC);
Text = Path::Combine( SSTATES_DIR, gsText );
}
else
{
Text = GetGSStateFilename();
}
SaveGSState(Text);
}
@ -630,20 +636,22 @@ void ProcessFKeys(int fkey, struct KeyModifiers *keymod)
#endif
case 12:
if( keymod->shift ) {
if( keymod->shift )
{
#ifdef PCSX2_DEVBUILD
iDumpRegisters(cpuRegs.pc, 0);
Console::Notice("hardware registers dumped EE:%x, IOP:%x\n", params cpuRegs.pc, psxRegs.pc);
#endif
}
else {
else
{
g_Pcsx2Recording ^= 1;
if( mtgsThread != NULL ) {
if( mtgsThread != NULL )
mtgsThread->SendSimplePacket(GS_RINGTYPE_RECORD, g_Pcsx2Recording, 0, 0);
}
else {
if( GSsetupRecording != NULL ) GSsetupRecording(g_Pcsx2Recording, NULL);
}
else if( GSsetupRecording != NULL )
GSsetupRecording(g_Pcsx2Recording, NULL);
if( SPU2setupRecording != NULL ) SPU2setupRecording(g_Pcsx2Recording, NULL);
}
break;

View File

@ -460,7 +460,7 @@ static void cropzeros(char *buffer)
stop = buffer--;
while (*buffer == '0') buffer--;
if (*buffer == '.') buffer--;
while (*++buffer = *stop++) ;
while (*++buffer = *stop++);
}
}

View File

@ -135,12 +135,9 @@
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG"
StringPooling="true"
MinimalRebuild="true"
ExceptionHandling="2"
SmallerTypeCheck="false"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="PrecompiledHeader.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"