diff --git a/README.md b/README.md index 4f8b12522b..df05c3efc6 100644 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ -![Prefs](http://i.imgur.com/TDF2c.png) \ No newline at end of file +This has been: + +1. Integrated to the main yabause +2. Also available in the Yabause Core of OpenEmu + +As such this repository will not be further updated + + +![Prefs](http://i.imgur.com/TDF2c.png) diff --git a/yabause/doc/CMakeLists.txt b/yabause/doc/CMakeLists.txt deleted file mode 100644 index ebd9fec1f3..0000000000 --- a/yabause/doc/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -project(yabause-doc) - -find_package(Doxygen) -if(DOXYGEN_FOUND) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) - add_custom_target(doc - ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating documentation with Doxygen" VERBATIM - ) -endif(DOXYGEN_FOUND) diff --git a/yabause/src/cocoa/English.lproj/MainMenu.xib b/yabause/src/cocoa/English.lproj/MainMenu.xib index 59e9041d9b..642d7e53ad 100644 --- a/yabause/src/cocoa/English.lproj/MainMenu.xib +++ b/yabause/src/cocoa/English.lproj/MainMenu.xib @@ -1,14 +1,14 @@ - 1070 - 11D50 - 2182 + 1060 + 11D50b + 2177 1138.32 568.00 com.apple.InterfaceBuilder.CocoaPlugin - 2182 + 2177 YES @@ -486,7 +486,7 @@ {320, 224} - + 274 YES @@ -495,12 +495,15 @@ 274 {320, 224} + YabauseGLView {320, 224} + + - {{0, 0}, {1280, 778}} + {{0, 0}, {1920, 1058}} {320, 246} {10000000000000, 10000000000000} YES @@ -518,7 +521,7 @@ - + 256 YES @@ -527,14 +530,12 @@ 12 {{13, 10}, {458, 398}} - - YES 1 - + 256 YES @@ -553,7 +554,6 @@ 268 {{18, 36}, {296, 22}} - YES @@ -593,7 +593,6 @@ 268 {{316, 30}, {96, 32}} - YES @@ -615,7 +614,6 @@ 268 {{16, 12}, {163, 18}} - YES @@ -626,11 +624,11 @@ 1211912703 2 - + NSImage NSSwitch - + NSSwitch @@ -642,13 +640,11 @@ {{1, 1}, {424, 68}} - {{6, 268}, {426, 84}} - {0, 0} @@ -687,7 +683,6 @@ 268 {{10, 10}, {262, 26}} - YES @@ -818,13 +813,11 @@ {{1, 1}, {424, 44}} - {{6, 69}, {426, 60}} - {0, 0} @@ -859,7 +852,6 @@ 268 {{18, 14}, {296, 22}} - YES @@ -879,7 +871,6 @@ 268 {{316, 8}, {96, 32}} - YES @@ -899,13 +890,11 @@ {{1, 1}, {424, 46}} - {{6, 133}, {426, 62}} - {0, 0} @@ -940,7 +929,6 @@ 268 {{316, 8}, {96, 32}} - YES @@ -962,7 +950,6 @@ 268 {{18, 14}, {296, 22}} - YES @@ -980,14 +967,12 @@ {{1, 1}, {424, 46}} - _NS:21 {{6, 202}, {426, 62}} - _NS:18 {0, 0} @@ -1023,7 +1008,6 @@ 268 {{10, 10}, {262, 26}} - YES @@ -1078,13 +1062,11 @@ {{1, 1}, {424, 44}} - {{6, 5}, {426, 60}} - {0, 0} @@ -1106,8 +1088,6 @@ {{10, 33}, {438, 352}} - - General @@ -1125,7 +1105,7 @@ 2 - + 256 YES @@ -1142,9 +1122,9 @@ 268 - {{15, 10}, {262, 26}} + {{15, 34}, {262, 26}} - + YES -2076049856 @@ -1218,13 +1198,38 @@ 2 + + + 268 + {{16, 12}, {136, 18}} + + + _NS:9 + YES + + 67239424 + 0 + Keep Aspect Ratio + + _NS:9 + + 1211912703 + 2 + + + + + 200 + 25 + + - {{1, 1}, {424, 44}} + {{1, 1}, {424, 68}} - {{6, 292}, {426, 60}} + {{6, 268}, {426, 84}} {0, 0} @@ -1260,7 +1265,6 @@ 268 {{15, 10}, {262, 26}} - YES -2076049856 @@ -1318,7 +1322,7 @@ - {{6, 228}, {426, 60}} + {{6, 205}, {426, 60}} {0, 0} @@ -1341,6 +1345,7 @@ {{10, 33}, {438, 352}} + Video/Sound @@ -1679,7 +1684,7 @@ 1 - + 256 YES @@ -2003,7 +2008,6 @@ {{10, 33}, {398, 278}} - Controller 1 @@ -2013,7 +2017,7 @@ 2 - + 256 YES @@ -2034,6 +2038,7 @@ {{14, 14}, {370, 264}} + YES 130560 @@ -2051,6 +2056,7 @@ 268 {{292, 177}, {17, 18}} + 25 YES @@ -2072,6 +2078,7 @@ 268 {{263, 164}, {17, 18}} + 24 YES @@ -2093,6 +2100,7 @@ 268 {{237, 145}, {17, 18}} + 23 YES @@ -2114,6 +2122,7 @@ 268 {{278, 130}, {17, 18}} + 21 YES @@ -2135,6 +2144,7 @@ 268 {{314, 145}, {17, 18}} + 22 YES @@ -2156,6 +2166,7 @@ 268 {{248, 210}, {67, 18}} + 17 YES @@ -2177,6 +2188,7 @@ 268 {{102, 162}, {21, 18}} + 13 YES @@ -2198,6 +2210,7 @@ 268 {{103, 117}, {21, 18}} + 15 YES @@ -2219,6 +2232,7 @@ 268 {{125, 139}, {21, 18}} + 14 YES @@ -2240,6 +2254,7 @@ 268 {{81, 139}, {21, 18}} + 16 YES @@ -2261,6 +2276,7 @@ 268 {{81, 210}, {65, 18}} + 18 YES @@ -2282,6 +2298,7 @@ 268 {{180, 111}, {38, 18}} + 19 YES @@ -2321,20 +2338,22 @@ {{10, 33}, {398, 278}} + + Controller 2 - + 0 YES YES YES - + @@ -2346,23 +2365,21 @@ - + 0 YES YES YES - + {484, 414} - - - {{0, 0}, {1280, 778}} + {{0, 0}, {1920, 1058}} {10000000000000, 10000000000000} YES @@ -2379,7 +2396,7 @@ - + 256 YES @@ -2388,7 +2405,6 @@ 268 {{17, 78}, {186, 17}} - YES @@ -2411,7 +2427,6 @@ 268 {{110, 12}, {96, 32}} - YES 67239424 @@ -2432,7 +2447,6 @@ 268 {{14, 12}, {96, 32}} - YES @@ -2454,7 +2468,6 @@ 268 {{62, 48}, {96, 22}} - YES @@ -2470,11 +2483,9 @@ {220, 115} - - - {{0, 0}, {1280, 778}} + {{0, 0}, {1920, 1058}} {10000000000000, 10000000000000} YES @@ -3197,6 +3208,22 @@ 1300 + + + aspectRatioToggle: + + + + 1306 + + + + keepAspectRatio + + + + 1307 + delegate @@ -3833,6 +3860,7 @@ YES + @@ -4812,6 +4840,20 @@ + + 1302 + + + YES + + + + + + 1303 + + + @@ -4899,6 +4941,8 @@ 1295.IBPluginDependency 130.IBPluginDependency 1301.IBPluginDependency + 1302.IBPluginDependency + 1303.IBPluginDependency 131.IBPluginDependency 134.IBPluginDependency 136.IBPluginDependency @@ -5146,6 +5190,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{257, 623}, {320, 224}} com.apple.InterfaceBuilder.CocoaPlugin @@ -5291,438 +5337,15 @@ - 1301 - - - - YES - - YabauseButtonFormatter - NSFormatter - - IBProjectSource - ./Classes/YabauseButtonFormatter.h - - - - YabauseController - NSObject - - YES - - YES - pause: - reset: - runBIOS: - runCD: - runISO: - showPreferences: - toggle: - toggleFrameskip: - toggleFullscreen: - - - YES - id - id - id - id - id - id - id - id - id - - - - YES - - YES - pause: - reset: - runBIOS: - runCD: - runISO: - showPreferences: - toggle: - toggleFrameskip: - toggleFullscreen: - - - YES - - pause: - id - - - reset: - id - - - runBIOS: - id - - - runCD: - id - - - runISO: - id - - - showPreferences: - id - - - toggle: - id - - - toggleFrameskip: - id - - - toggleFullscreen: - id - - - - - YES - - YES - frameskip - logView - logWindow - prefs - prefsPane - view - - - YES - NSMenuItem - NSTextView - NSWindow - YabausePrefsController - NSPanel - YabauseGLView - - - - YES - - YES - frameskip - logView - logWindow - prefs - prefsPane - view - - - YES - - frameskip - NSMenuItem - - - logView - NSTextView - - - logWindow - NSWindow - - - prefs - YabausePrefsController - - - prefsPane - NSPanel - - - view - YabauseGLView - - - - - IBProjectSource - ./Classes/YabauseController.h - - - - YabauseGLView - NSOpenGLView - - window - NSWindow - - - window - - window - NSWindow - - - - IBProjectSource - ./Classes/YabauseGLView.h - - - - YabausePrefsController - NSObject - - YES - - YES - biosBrowse: - biosToggle: - bramBrowse: - buttonSelect: - buttonSetCancel: - buttonSetOk: - cartBrowse: - cartSelected: - cdBrowse: - cpuCoreSelected: - mpegBrowse: - regionSelected: - soundCoreSelected: - videoCoreSelected: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - biosBrowse: - biosToggle: - bramBrowse: - buttonSelect: - buttonSetCancel: - buttonSetOk: - cartBrowse: - cartSelected: - cdBrowse: - cpuCoreSelected: - mpegBrowse: - regionSelected: - soundCoreSelected: - videoCoreSelected: - - - YES - - biosBrowse: - id - - - biosToggle: - id - - - bramBrowse: - id - - - buttonSelect: - id - - - buttonSetCancel: - id - - - buttonSetOk: - id - - - cartBrowse: - id - - - cartSelected: - id - - - cdBrowse: - id - - - cpuCoreSelected: - id - - - mpegBrowse: - id - - - regionSelected: - id - - - soundCoreSelected: - id - - - videoCoreSelected: - id - - - - - YES - - YES - biosPath - bramPath - buttonAssignment - buttonBox - cartBrowse - cartPath - cartType - cdPath - cpuCore - emulateBios - mpegPath - prefsPane - region - soundCore - videoCore - - - YES - NSTextField - NSTextField - NSPanel - NSTextField - NSButton - NSTextField - NSPopUpButton - NSTextField - NSPopUpButton - NSButton - NSTextField - NSPanel - NSPopUpButton - NSPopUpButton - NSPopUpButton - - - - YES - - YES - biosPath - bramPath - buttonAssignment - buttonBox - cartBrowse - cartPath - cartType - cdPath - cpuCore - emulateBios - mpegPath - prefsPane - region - soundCore - videoCore - - - YES - - biosPath - NSTextField - - - bramPath - NSTextField - - - buttonAssignment - NSPanel - - - buttonBox - NSTextField - - - cartBrowse - NSButton - - - cartPath - NSTextField - - - cartType - NSPopUpButton - - - cdPath - NSTextField - - - cpuCore - NSPopUpButton - - - emulateBios - NSButton - - - mpegPath - NSTextField - - - prefsPane - NSPanel - - - region - NSPopUpButton - - - soundCore - NSPopUpButton - - - videoCore - NSPopUpButton - - - - - IBProjectSource - ./Classes/YabausePrefsController.h - - - + 1307 + 0 IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 diff --git a/yabause/src/cocoa/Yabause.xcodeproj/project.pbxproj b/yabause/src/cocoa/Yabause.xcodeproj/project.pbxproj index 54a96b5041..332ebcc993 100644 --- a/yabause/src/cocoa/Yabause.xcodeproj/project.pbxproj +++ b/yabause/src/cocoa/Yabause.xcodeproj/project.pbxproj @@ -681,10 +681,13 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; GCC_UNROLL_LOOPS = YES; + GCC_VERSION = ""; INFOPLIST_FILE = "Yabause-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_CFLAGS = "-fnested-functions"; PRODUCT_NAME = Yabause; + SDKROOT = macosx10.7; }; name = Debug; }; @@ -697,17 +700,20 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; GCC_UNROLL_LOOPS = YES; + GCC_VERSION = ""; INFOPLIST_FILE = "Yabause-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; + MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_CFLAGS = "-fnested-functions"; PRODUCT_NAME = Yabause; + SDKROOT = macosx10.7; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_OPENMP_SUPPORT = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -736,7 +742,7 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 3; diff --git a/yabause/src/cocoa/YabauseController.m b/yabause/src/cocoa/YabauseController.m index 40f1f0a67f..6f551c223e 100644 --- a/yabause/src/cocoa/YabauseController.m +++ b/yabause/src/cocoa/YabauseController.m @@ -86,6 +86,7 @@ - (void)awakeFromNib [frameskip setState:NSOffState]; DisableAutoFrameSkip(); } + } - (void)dealloc @@ -315,6 +316,16 @@ - (void)startEmulationWithCDCore:(int)cdcore _running = YES; _doneExecuting = NO; + /* Should we keep the aspect ratio */ + NSUserDefaults *p = [NSUserDefaults standardUserDefaults]; + if([p boolForKey:@"Keep Aspect Ratio"] == YES) { + [[view window] setAspectRatio:NSMakeSize(320.0, 224.0)]; + } + else { + // Unlock the aspect ratio + [[view window] setResizeIncrements:NSMakeSize(1.0, 1.0)]; + } + [view showWindow]; /* The emulation itself takes place in a separate thread from the main diff --git a/yabause/src/cocoa/YabauseGLView.m b/yabause/src/cocoa/YabauseGLView.m index 0928160863..eaba943e25 100644 --- a/yabause/src/cocoa/YabauseGLView.m +++ b/yabause/src/cocoa/YabauseGLView.m @@ -61,7 +61,7 @@ - (id)initWithFrame:(NSRect)frameRect _isFullscreen = NO; [fmt release]; - + return self; } @@ -143,9 +143,13 @@ - (void)showWindow - (void)reshape { + // Lock the context during resize + CGLContextObj cxt = CGLGetCurrentContext(); + CGLLockContext(cxt); if(VIDCore) VIDCore->Resize([self width], [self height], 0); - + + CGLUnlockContext(cxt); [super reshape]; } diff --git a/yabause/src/cocoa/YabausePrefsController.h b/yabause/src/cocoa/YabausePrefsController.h index f25c04d295..cf6a8d23da 100644 --- a/yabause/src/cocoa/YabausePrefsController.h +++ b/yabause/src/cocoa/YabausePrefsController.h @@ -30,6 +30,7 @@ IBOutlet NSTextField *cartPath; IBOutlet NSPopUpButton *cartType; IBOutlet NSButton *emulateBios; + IBOutlet NSButton *keepAspectRatio; IBOutlet NSTextField *mpegPath; IBOutlet NSPopUpButton *region; IBOutlet NSPopUpButton *soundCore; @@ -66,7 +67,7 @@ - (IBAction)cdBrowse:(id)sender; - (IBAction)biosToggle:(id)sender; - (IBAction)buttonSelect:(id)sender; - +- (IBAction)aspectRatioToggle:(id)sender; - (IBAction)buttonSetOk:(id)sender; - (IBAction)buttonSetCancel:(id)sender; @@ -77,6 +78,7 @@ - (int)cpuCore; - (NSString *)biosPath; - (BOOL)emulateBios; +- (BOOL)keepAspectRatio; - (NSString *)mpegPath; - (NSString *)bramPath; - (NSString *)cartPath; diff --git a/yabause/src/cocoa/YabausePrefsController.m b/yabause/src/cocoa/YabausePrefsController.m index 31cb476b8c..e256bc8a33 100644 --- a/yabause/src/cocoa/YabausePrefsController.m +++ b/yabause/src/cocoa/YabausePrefsController.m @@ -54,12 +54,20 @@ - (void)awakeFromNib if([_prefs objectForKey:@"Emulate BIOS"]) { [emulateBios setState:[_prefs boolForKey:@"Emulate BIOS"] ? - NSOnState : NSOffState]; + NSOnState : NSOffState]; } else { [_prefs setBool:YES forKey:@"Emulate BIOS"]; } + if([_prefs objectForKey:@"Keep Aspect Ratio"]) { + [keepAspectRatio setState:[_prefs boolForKey:@"Keep Aspect Ratio"] ? + NSOnState : NSOffState]; + } + else { + [_prefs setBool:YES forKey:@"Keep Aspect Ratio"]; + } + if([_prefs objectForKey:@"MPEG ROM Path"]) { [mpegPath setStringValue:[_prefs objectForKey:@"MPEG ROM Path"]]; } @@ -312,6 +320,13 @@ - (IBAction)biosToggle:(id)sender [_prefs synchronize]; } +- (IBAction)aspectRatioToggle:(id)sender +{ + /* Update the preferences file. */ + [_prefs setBool:([sender state] == NSOnState) forKey:@"Keep Aspect Ratio"]; + [_prefs synchronize]; +} + - (IBAction)buttonSelect:(id)sender { NSInteger rv; diff --git a/yabause/src/sndmac.c b/yabause/src/sndmac.c index a1bd49aa3b..966e41511e 100644 --- a/yabause/src/sndmac.c +++ b/yabause/src/sndmac.c @@ -21,6 +21,8 @@ /* This file is adapted from CrabEmu's sound.c for Mac OS X as well as the sndsdl.c file in Yabause. */ +//loicloic +#include #include #include #include