pref menu enabled

This commit is contained in:
kanjitalk755 2018-06-15 14:52:28 +09:00
parent 33a5112968
commit 51491dd03f
4 changed files with 30 additions and 4 deletions

View File

@ -1364,7 +1364,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
INSTALL_PATH = "$(HOME)/Applications"; INSTALL_PATH = "$(HOME)/Applications";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.6; MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = ""; OTHER_CFLAGS = "";
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII;
@ -1414,7 +1414,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
INSTALL_PATH = "$(HOME)/Applications"; INSTALL_PATH = "$(HOME)/Applications";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.6; MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = ""; OTHER_CFLAGS = "";
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII;

View File

@ -19,6 +19,7 @@
*/ */
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#include "sysdeps.h"
#include "utils_macosx.h" #include "utils_macosx.h"
#include <SDL.h> #include <SDL.h>
@ -38,6 +39,13 @@ void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() {
for (NSMenuItem * menu_item in [NSApp mainMenu].itemArray) { for (NSMenuItem * menu_item in [NSApp mainMenu].itemArray) {
if (menu_item.hasSubmenu) { if (menu_item.hasSubmenu) {
for (NSMenuItem * sub_item in menu_item.submenu.itemArray) { for (NSMenuItem * sub_item in menu_item.submenu.itemArray) {
#ifdef SHEEPSHAVER
if ([sub_item.title isEqualToString:@"Preferences…"]) {
extern id gSheepShaverMain;
sub_item.target = gSheepShaverMain;
sub_item.action = @selector(openPreferences:);
}
#endif
sub_item.keyEquivalent = @""; sub_item.keyEquivalent = @"";
sub_item.keyEquivalentModifierMask = 0; sub_item.keyEquivalentModifierMask = 0;
} }

View File

@ -1345,7 +1345,7 @@
INFOPLIST_PREFIX_HEADER = ""; INFOPLIST_PREFIX_HEADER = "";
INFOPLIST_PREPROCESS = NO; INFOPLIST_PREPROCESS = NO;
INSTALL_PATH = "$(HOME)/Applications"; INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6; MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = ""; OTHER_CFLAGS = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
@ -1403,7 +1403,7 @@
INFOPLIST_PREFIX_HEADER = ""; INFOPLIST_PREFIX_HEADER = "";
INFOPLIST_PREPROCESS = NO; INFOPLIST_PREPROCESS = NO;
INSTALL_PATH = "$(HOME)/Applications"; INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6; MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = ""; OTHER_CFLAGS = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (

View File

@ -30,6 +30,7 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#include "VMSettingsController.h" #include "VMSettingsController.h"
#include <SDL.h>
@interface SheepShaverMain : NSObject @interface SheepShaverMain : NSObject
{ {
@ -96,12 +97,28 @@
[pool release]; [pool release];
} }
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
return YES;
}
@end @end
/* /*
* Initialization * Initialization
*/ */
#if SDL_VERSION_ATLEAST(2,0,0)
id gSheepShaverMain;
void prefs_init(void)
{
gSheepShaverMain = [[SheepShaverMain alloc] init];
}
#else
void prefs_init(void) void prefs_init(void)
{ {
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
@ -121,6 +138,7 @@ void prefs_init(void)
[pool release]; [pool release];
} }
#endif
/* /*
* Deinitialization * Deinitialization