PanicAlert, PanicYesNo, AskYesNo now use wxMessageBox. Also some very minor fixes in Fill'N'Slide.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1506 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ffae8c51d6
commit
45201abb9e
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9.00"
|
||||||
Name="Common"
|
Name="Common"
|
||||||
ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
|
ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
|
||||||
RootNamespace="Common"
|
RootNamespace="Common"
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
AdditionalIncludeDirectories="../../PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
|
#include <wx/msgdlg.h>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -45,17 +46,10 @@ void PanicAlert(const char* format, ...)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
CharArrayFromFormatV(buffer, 2048, format, args);
|
CharArrayFromFormatV(buffer, 2048, format, args);
|
||||||
LOG(MASTER_LOG, "PANIC: %s", buffer);
|
LOG(MASTER_LOG, "PANIC: %s", buffer);
|
||||||
MessageBox(0, buffer, "PANIC!", MB_ICONWARNING);
|
wxMessageBox(buffer, "PANIC!", wxICON_EXCLAMATION);
|
||||||
#elif __GNUC__
|
|
||||||
//#error Do a messagebox!
|
|
||||||
vprintf(format, args);
|
|
||||||
printf("\n");
|
|
||||||
// asm ("int $3") ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
@ -67,16 +61,10 @@ bool PanicYesNo(const char* format, ...)
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
bool retval;
|
bool retval;
|
||||||
#ifdef _WIN32
|
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
CharArrayFromFormatV(buffer, 2048, format, args);
|
CharArrayFromFormatV(buffer, 2048, format, args);
|
||||||
LOG(MASTER_LOG, "PANIC: %s", buffer);
|
LOG(MASTER_LOG, "PANIC: %s", buffer);
|
||||||
retval = IDYES == MessageBox(0, buffer, "PANIC! Continue?", MB_ICONQUESTION | MB_YESNO);
|
retval = wxYES == wxMessageBox(buffer, "PANIC! Continue?", wxICON_QUESTION | wxYES_NO);
|
||||||
#elif __GNUC__
|
|
||||||
//vprintf(format, args);
|
|
||||||
return(true); //#error Do a messagebox!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
@ -87,16 +75,10 @@ bool AskYesNo(const char* format, ...)
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
bool retval;
|
bool retval;
|
||||||
#ifdef _WIN32
|
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
CharArrayFromFormatV(buffer, 2048, format, args);
|
CharArrayFromFormatV(buffer, 2048, format, args);
|
||||||
LOG(MASTER_LOG, "ASK: %s", buffer);
|
LOG(MASTER_LOG, "ASK: %s", buffer);
|
||||||
retval = IDYES == MessageBox(0, buffer, "Dolphin", MB_ICONQUESTION | MB_YESNO);
|
retval = wxYES == wxMessageBox(buffer, "Dolphin", wxICON_QUESTION | wxYES_NO);
|
||||||
#elif __GNUC__
|
|
||||||
//vprintf(format, args);
|
|
||||||
return(true); //#error Do a messagebox!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
|
@ -593,15 +593,15 @@ bool ZeroCode_FillAndSlide(u32 val_last, u32 addr, u32 data) // This needs more
|
||||||
LogInfo("Write %08x to address %08x", val & 0xFF, curr_addr);
|
LogInfo("Write %08x to address %08x", val & 0xFF, curr_addr);
|
||||||
if (val_incr < 0)
|
if (val_incr < 0)
|
||||||
{
|
{
|
||||||
val -= (u32)val_incr;
|
val -= (u32)abs(val_incr);
|
||||||
}
|
}
|
||||||
if (val_incr > 0)
|
if (val_incr > 0)
|
||||||
{
|
{
|
||||||
val += (u32)(abs(val_incr));
|
val += (u32)val_incr;
|
||||||
}
|
}
|
||||||
if (addr_incr < 0)
|
if (addr_incr < 0)
|
||||||
{
|
{
|
||||||
curr_addr -= (u32)(abs(addr_incr));
|
curr_addr -= (u32)abs(addr_incr);
|
||||||
}
|
}
|
||||||
if (addr_incr > 0)
|
if (addr_incr > 0)
|
||||||
{
|
{
|
||||||
|
@ -620,15 +620,15 @@ bool ZeroCode_FillAndSlide(u32 val_last, u32 addr, u32 data) // This needs more
|
||||||
LogInfo("Write %08x to address %08x", val & 0xFFFF, curr_addr);
|
LogInfo("Write %08x to address %08x", val & 0xFFFF, curr_addr);
|
||||||
if (val_incr < 0)
|
if (val_incr < 0)
|
||||||
{
|
{
|
||||||
val -= (u32)val_incr;
|
val -= (u32)abs(val_incr);
|
||||||
}
|
}
|
||||||
if (val_incr > 0)
|
if (val_incr > 0)
|
||||||
{
|
{
|
||||||
val += (u32)(abs(val_incr));
|
val += (u32)val_incr;
|
||||||
}
|
}
|
||||||
if (addr_incr < 0)
|
if (addr_incr < 0)
|
||||||
{
|
{
|
||||||
curr_addr -= (u32)(abs(addr_incr));
|
curr_addr -= (u32)abs(addr_incr);
|
||||||
}
|
}
|
||||||
if (addr_incr > 0)
|
if (addr_incr > 0)
|
||||||
{
|
{
|
||||||
|
@ -647,15 +647,15 @@ bool ZeroCode_FillAndSlide(u32 val_last, u32 addr, u32 data) // This needs more
|
||||||
LogInfo("Write %08x to address %08x", val, curr_addr);
|
LogInfo("Write %08x to address %08x", val, curr_addr);
|
||||||
if (val_incr < 0)
|
if (val_incr < 0)
|
||||||
{
|
{
|
||||||
val -= (u32)val_incr;
|
val -= (u32)abs(val_incr);
|
||||||
}
|
}
|
||||||
if (val_incr > 0)
|
if (val_incr > 0)
|
||||||
{
|
{
|
||||||
val += (u32)(abs(val_incr));
|
val += (u32)val_incr;
|
||||||
}
|
}
|
||||||
if (addr_incr < 0)
|
if (addr_incr < 0)
|
||||||
{
|
{
|
||||||
curr_addr -= (u32)(abs(addr_incr));
|
curr_addr -= (u32)abs(addr_incr);
|
||||||
}
|
}
|
||||||
if (addr_incr > 0)
|
if (addr_incr > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9.00"
|
||||||
Name="DolphinWX"
|
Name="DolphinWX"
|
||||||
ProjectGUID="{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
|
ProjectGUID="{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
|
||||||
RootNamespace="DolphinWX"
|
RootNamespace="DolphinWX"
|
||||||
|
|
Loading…
Reference in New Issue