mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-10 18:29:44 +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)];
|
||||
}
|
||||
|
||||
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 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
|
||||
const char *rom_path = PrefsFindString("rom");
|
||||
|
||||
|
@ -1005,6 +1005,11 @@ int main(int argc, char **argv)
|
||||
goto quit;
|
||||
}
|
||||
|
||||
#if __MACOSX__
|
||||
extern void set_current_directory();
|
||||
set_current_directory();
|
||||
#endif
|
||||
|
||||
// Load Mac ROM
|
||||
if (!load_mac_rom())
|
||||
goto quit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user