mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
RISCOS: Implement OSystem::messageBox()
This commit is contained in:
parent
1ac3cb27ac
commit
a3f83e07ab
@ -116,6 +116,36 @@ void OSystem_RISCOS::logMessage(LogMessageType::Type type, const char *message)
|
||||
_swix(Report_Text0, _IN(0), report.c_str());
|
||||
}
|
||||
|
||||
void OSystem_RISCOS::messageBox(LogMessageType::Type type, const char *message) {
|
||||
_kernel_swi_regs regs;
|
||||
_kernel_oserror error;
|
||||
|
||||
error.errnum = 0;
|
||||
Common::strlcpy(error.errmess, message, 252);
|
||||
regs.r[0] = (int)&error;
|
||||
regs.r[1] = 0;
|
||||
regs.r[2] = (int)"ScummVM";
|
||||
regs.r[3] = 0;
|
||||
regs.r[4] = 0;
|
||||
regs.r[5] = 0;
|
||||
|
||||
switch (type) {
|
||||
case LogMessageType::kError:
|
||||
regs.r[1] |= (1 << 8);
|
||||
break;
|
||||
case LogMessageType::kWarning:
|
||||
regs.r[1] |= (1 << 8) | (2 << 9);
|
||||
break;
|
||||
case LogMessageType::kInfo:
|
||||
case LogMessageType::kDebug:
|
||||
default:
|
||||
regs.r[1] |= (1 << 8) | (1 << 9);
|
||||
break;
|
||||
}
|
||||
|
||||
_kernel_swi(Wimp_ReportError, ®s, ®s);
|
||||
}
|
||||
|
||||
Common::String OSystem_RISCOS::getDefaultConfigFileName() {
|
||||
return "/<Choices$Write>/ScummVM/scummvmrc";
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
virtual bool openUrl(const Common::String &url);
|
||||
|
||||
virtual void logMessage(LogMessageType::Type type, const char *message);
|
||||
virtual void messageBox(LogMessageType::Type type, const char *message);
|
||||
|
||||
protected:
|
||||
virtual Common::String getDefaultConfigFileName();
|
||||
|
Loading…
Reference in New Issue
Block a user