mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
new MsgHandler replacing common
Most things moved to macros git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1542 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -190,15 +190,25 @@ inline u64 swap64(u64 data) {return(((u64)swap32(data) << 32) | swap32(data >> 3
|
||||
|
||||
// Utility functions
|
||||
|
||||
void PanicAlert(const char* text, ...);
|
||||
void SuccessAlert(const char* text, ...);
|
||||
bool PanicYesNo(const char* text, ...);
|
||||
bool AskYesNo(const char* text, ...);
|
||||
|
||||
// Msg Alert
|
||||
typedef bool (*MsgAlertHandler)(const char* caption, const char* text,
|
||||
bool yes_no);
|
||||
void RegisterMsgAlertHandler(MsgAlertHandler handler);
|
||||
extern bool MsgAlert(const char* caption, bool yes_no, const char* format, ...);
|
||||
#ifdef _WIN32
|
||||
#define SuccessAlert(format, ...) MsgAlert("SUCCESS", false, format, __VA_ARGS__)
|
||||
#define PanicAlert(format, ...) MsgAlert("PANIC", false, format, __VA_ARGS__)
|
||||
#define PanicYesNo(format, ...) MsgAlert("PANIC", true, format, __VA_ARGS__)
|
||||
#define AskYesNo(format, ...) MsgAlert("ASK", true, format, __VA_ARGS__)
|
||||
#else
|
||||
#define SuccessAlert(format, ...) MsgAlert("SUCCESS", false, format, ##__VA_ARGS__)
|
||||
#define PanicAlert(format, ...) MsgAlert("PANIC", false, format, ##__VA_ARGS__)
|
||||
#define PanicYesNo(format, ...) MsgAlert("PANIC", true, format, ##__VA_ARGS__)
|
||||
#define AskYesNo(format, ...) MsgAlert("ASK", true, format, ##__VA_ARGS__)
|
||||
#endif
|
||||
extern void __Log(int logNumber, const char* text, ...);
|
||||
extern void __Logv(int log, int v, const char *format, ...);
|
||||
|
||||
|
||||
// dummy class
|
||||
class LogTypes
|
||||
{
|
||||
@ -241,8 +251,6 @@ class LogTypes
|
||||
};
|
||||
};
|
||||
|
||||
typedef bool (*PanicAlertHandler)(const char* text, bool yes_no);
|
||||
void RegisterPanicAlertHandler(PanicAlertHandler handler);
|
||||
|
||||
void Host_UpdateLogDisplay();
|
||||
|
||||
|
Reference in New Issue
Block a user