mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Try not to crash on hard reset
This commit is contained in:
parent
145ad17fa2
commit
33965546d7
@ -54,14 +54,8 @@ public:
|
||||
[m_console release];
|
||||
}
|
||||
|
||||
virtual int init()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void exit()
|
||||
{
|
||||
}
|
||||
virtual int init();
|
||||
virtual void exit();
|
||||
|
||||
virtual void init_debugger(running_machine &machine);
|
||||
virtual void wait_for_debugger(device_t &device, bool firststop);
|
||||
@ -74,13 +68,41 @@ private:
|
||||
|
||||
MODULE_DEFINITION(DEBUG_OSX, debugger_osx)
|
||||
|
||||
//============================================================
|
||||
// debugger_osx::init
|
||||
//============================================================
|
||||
|
||||
int debugger_osx::init()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// debugger_osx::exit
|
||||
//============================================================
|
||||
|
||||
void debugger_osx::exit()
|
||||
{
|
||||
if (m_console)
|
||||
{
|
||||
NSDictionary *info = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:m_machine]
|
||||
forKey:@"MAMEDebugMachine"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification
|
||||
object:m_console
|
||||
userInfo:info];
|
||||
[m_console release];
|
||||
m_console = nil;
|
||||
m_machine = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// debugger_osx::init_debugger
|
||||
//============================================================
|
||||
|
||||
void debugger_osx::init_debugger(running_machine &machine)
|
||||
{
|
||||
m_machine = &machine;
|
||||
m_machine = &machine;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
@ -94,7 +116,8 @@ void debugger_osx::wait_for_debugger(device_t &device, bool firststop)
|
||||
m_console = [[MAMEDebugConsole alloc] initWithMachine:*m_machine];
|
||||
|
||||
// make sure the debug windows are visible
|
||||
if (firststop) {
|
||||
if (firststop)
|
||||
{
|
||||
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:[NSValue valueWithPointer:&device],
|
||||
@"MAMEDebugDevice",
|
||||
[NSValue valueWithPointer:m_machine],
|
||||
|
Loading…
Reference in New Issue
Block a user