mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-21 02:29:06 +00:00
set current directory
This commit is contained in:
parent
51e08e9b76
commit
8d89152b79
@ -75,3 +75,9 @@ void set_menu_bar_visible_osx(bool visible)
|
|||||||
{
|
{
|
||||||
[NSMenu setMenuBarVisible:(visible ? YES : NO)];
|
[NSMenu setMenuBarVisible:(visible ? YES : NO)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_current_directory()
|
||||||
|
{
|
||||||
|
chdir([[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] UTF8String]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -658,6 +658,11 @@ int main(int argc, char **argv)
|
|||||||
D(bug("Mac RAM starts at %p (%08x)\n", RAMBaseHost, RAMBaseMac));
|
D(bug("Mac RAM starts at %p (%08x)\n", RAMBaseHost, RAMBaseMac));
|
||||||
D(bug("Mac ROM starts at %p (%08x)\n", ROMBaseHost, ROMBaseMac));
|
D(bug("Mac ROM starts at %p (%08x)\n", ROMBaseHost, ROMBaseMac));
|
||||||
|
|
||||||
|
#if __MACOSX__
|
||||||
|
extern void set_current_directory();
|
||||||
|
set_current_directory();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get rom file path from preferences
|
// Get rom file path from preferences
|
||||||
const char *rom_path = PrefsFindString("rom");
|
const char *rom_path = PrefsFindString("rom");
|
||||||
|
|
||||||
|
@ -1005,6 +1005,11 @@ int main(int argc, char **argv)
|
|||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __MACOSX__
|
||||||
|
extern void set_current_directory();
|
||||||
|
set_current_directory();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Load Mac ROM
|
// Load Mac ROM
|
||||||
if (!load_mac_rom())
|
if (!load_mac_rom())
|
||||||
goto quit;
|
goto quit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user