Mac: Fix file dialog gliches in 10.6, fix musicbox crash, add the option to speify save folders, etc.

This commit is contained in:
zones 2011-01-16 14:57:11 +09:00
parent 695e4b6b8e
commit f918834f68
32 changed files with 8859 additions and 8098 deletions

View File

@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Snes9x";
CFBundleShortVersionString = "1.52";
CFBundleGetInfoString = "Snes9x 1.52, Copyright 1996-2010 Snes9x developers.";
CFBundleShortVersionString = "1.53";
CFBundleGetInfoString = "Snes9x 1.53, Copyright 1996-2011 Snes9x developers.";

View File

@ -24,6 +24,7 @@
"MoviePrevBorder" = "45"; // width of indexes column
"ClearMenu" = "Clear Menu";
"NoneSelected" = "None Selected";
"NPReady" = "Ready";
"NPConnecting" = "Connecting";
@ -47,3 +48,36 @@
"SoundEffectDlg" = "Sound Effect";
"CreateMetalDlg" = "NO"; // "YES" to metalize above dialogs
"RecordSMV1" = "1";
"RecordSMV2" = "2";
"RecordSMV3" = "3";
"RecordSMV4" = "4";
"RecordSMV5" = "5";
"RecordSMV6" = "Players to Record :";
"RecordSMV7" = "Comment :";
"RecordSMV8" = "Reset";
"PlaySMV1" = "Read Only";
"PlaySMV2" = "Export to QuickTime Movie at a Time";
"QTRecord1" = "Double Size";
"QTRecord2" = "Overscan";
"QTRecord3" = "Frame Skip :";
"QTRecord4" = "Compression...";
"OpenROM1" = "Memory Type :";
"OpenROM2" = "Video System :";
"OpenROM3" = "Interleave Mode :";
"OpenROM4" = "Header :";
"OpenROM5" = "Auto Detect";
"OpenROM6" = "Force LoROM";
"OpenROM7" = "Force HiROM";
"OpenROM8" = "Force PAL";
"OpenROM9" = "Force NTSC";
"OpenROMa" = "Force not Interleaved";
"OpenROMb" = "Force Mode 1";
"OpenROMc" = "Force Mode 2";
"OpenROMd" = "Force GD24";
"OpenROMe" = "Force no Header";
"OpenROMf" = "Force Header";

View File

@ -3,17 +3,15 @@
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>740</string>
<string>823</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../ntsctest.xcodeproj</string>
<string>../macpdate.xcodeproj</string>
<key>IBOldestOS</key>
<integer>6</integer>
<key>IBOpenObjects</key>
<array>
<integer>265</integer>
</array>
<array/>
<key>IBSystem Version</key>
<string>10C540</string>
<string>10J567</string>
<key>targetFramework</key>
<string>IBCarbonFramework</string>
</dict>

File diff suppressed because it is too large Load Diff

View File

@ -162,7 +162,7 @@
<key>CFBundleExecutable</key>
<string>Snes9x</string>
<key>CFBundleGetInfoString</key>
<string>Snes9x 1.52, Copyright 1996-2010 Snes9x developers.</string>
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
<key>CFBundleHelpBookFolder</key>
<string>Snes9x Help</string>
<key>CFBundleHelpBookName</key>
@ -178,11 +178,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.52</string>
<string>1.53</string>
<key>CFBundleSignature</key>
<string>~9X~</string>
<key>CFBundleVersion</key>
<string>1.52</string>
<string>1.53</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -162,7 +162,7 @@
<key>CFBundleExecutable</key>
<string>Snes9x (i386)</string>
<key>CFBundleGetInfoString</key>
<string>Snes9x 1.52, Copyright 1996-2010 Snes9x developers.</string>
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
<key>CFBundleHelpBookFolder</key>
<string>Snes9x Help</string>
<key>CFBundleHelpBookName</key>
@ -178,11 +178,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.52</string>
<string>1.53</string>
<key>CFBundleSignature</key>
<string>~9X~</string>
<key>CFBundleVersion</key>
<string>1.52</string>
<string>1.53</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -162,7 +162,7 @@
<key>CFBundleExecutable</key>
<string>Snes9x (ppc)</string>
<key>CFBundleGetInfoString</key>
<string>Snes9x 1.52, Copyright 1996-2010 Snes9x developers.</string>
<string>Snes9x 1.53, Copyright 1996-2011 Snes9x developers.</string>
<key>CFBundleHelpBookFolder</key>
<string>Snes9x Help</string>
<key>CFBundleHelpBookName</key>
@ -178,11 +178,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.52</string>
<string>1.53</string>
<key>CFBundleSignature</key>
<string>~9X~</string>
<key>CFBundleVersion</key>
<string>1.52</string>
<string>1.53</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -827,7 +827,6 @@ void ConfigureSoundEffects (void)
EventTypeSpec event[] = { { kEventClassWindow, kEventWindowClose },
{ kEventClassCommand, kEventCommandProcess },
{ kEventClassCommand, kEventCommandUpdateStatus } };
MenuRef menu;
HIViewRef ctl, userpane, contentview;
HIViewID cid;
CFStringRef str;
@ -927,18 +926,13 @@ void ConfigureSoundEffects (void)
cid.signature = 'Epop';
HIViewFindByID(userpane, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
switch (cureffect)
{
case kAUReverb:
CheckMenuItem(menu, 1, true);
SetControl32BitValue(ctl, 1);
break;
case kAUGraphEQ:
CheckMenuItem(menu, 2, true);
SetControl32BitValue(ctl, 2);
break;
}

2
macosx/mac-cart.h Normal file → Executable file
View File

@ -194,6 +194,8 @@
bool8 NavOpenROMImage (FSRef *);
bool8 NavBeginOpenROMImageSheet (WindowRef, CFStringRef);
bool8 NavEndOpenROMImageSheet (FSRef *);
bool8 NavBeginChooseFolderSheet (WindowRef);
bool8 NavEndChooseFolderSheet (FSRef *);
bool8 NavFreezeTo (char *);
bool8 NavDefrostFrom (char *);
bool8 NavRecordMovieTo (char *);

2788
macosx/mac-cart.cpp → macosx/mac-cart.mm Normal file → Executable file

File diff suppressed because it is too large Load Diff

13
macosx/mac-cheatfinder.cpp Normal file → Executable file
View File

@ -422,7 +422,6 @@ void CheatFinder (void)
OSStatus err;
HIViewRef ctl;
HIViewID cid;
MenuRef menu;
char num[256];
WindowData cf;
EventHandlerRef wEref, pEref;
@ -517,10 +516,6 @@ void CheatFinder (void)
cid.signature = kCFNumBytesPop;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
CheckMenuItem(menu, cfViewNumBytes, true);
SetControl32BitValue(ctl, cfViewNumBytes);
cid.signature = kCFViewModeRad;
@ -529,10 +524,6 @@ void CheatFinder (void)
cid.signature = kCFCompModePop;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
CheckMenuItem(menu, cfCompMode, true);
SetControl32BitValue(ctl, cfCompMode);
if (cfIsNewGame || (!cfIsStored && (cfCompWith == kCFCompWithStored)))
@ -1704,7 +1695,7 @@ static void CheatFinderListViewDraw (CGContextRef ctx, HIRect *bounds, ListViewD
f = -(y + 12.0f);
sprintf(t1, "%06lX", cfAddress[i] + 0x7E0000);
str = CFStringCreateWithCString(kCFAllocatorDefault, t1, MAC_PATH_ENCODING);
str = CFStringCreateWithCString(kCFAllocatorDefault, t1, kCFStringEncodingUTF8);
astr = CFAttributedStringCreate(kCFAllocatorDefault, str, attr);
line = CTLineCreateWithAttributedString(astr);
CGContextSetTextPosition(ctx, ax, f);
@ -1717,7 +1708,7 @@ static void CheatFinderListViewDraw (CGContextRef ctx, HIRect *bounds, ListViewD
strcpy(t1, " ");
t1[11 - strlen(t2)] = 0;
strcat(t1, t2);
str = CFStringCreateWithCString(kCFAllocatorDefault, t1, MAC_PATH_ENCODING);
str = CFStringCreateWithCString(kCFAllocatorDefault, t1, kCFStringEncodingUTF8);
astr = CFAttributedStringCreate(kCFAllocatorDefault, str, attr);
line = CTLineCreateWithAttributedString(astr);
CGContextSetTextPosition(ctx, vx, f);

View File

@ -363,7 +363,7 @@ bool8 NPClientDialog (void)
cid.signature = 'CLNM';
HIViewFindByID(root, cid, &ctl);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npName, MAC_PATH_ENCODING);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npName, kCFStringEncodingUTF8);
if (ref)
{
SetEditTextCFString(ctl, ref, false);
@ -452,7 +452,7 @@ static pascal OSStatus NPClientDialogEventHandler (EventHandlerCallRef inHandler
{
Boolean r;
r = CFStringGetCString(ref, npclient.name, 256, MAC_PATH_ENCODING);
r = CFStringGetCString(ref, npclient.name, 256, kCFStringEncodingUTF8);
if (!r)
strcpy(npclient.name, "unknown");
else
@ -903,7 +903,7 @@ static bool8 NPClientBeginOpenROMImage (WindowRef window)
ResetCheatFinder();
romRef = CFStringCreateWithCString(kCFAllocatorDefault, nprominfo.fname, MAC_PATH_ENCODING);
romRef = CFStringCreateWithCString(kCFAllocatorDefault, nprominfo.fname, kCFStringEncodingUTF8);
numRef = CFCopyLocalizedString(CFSTR("NPROMNamePos"), "1");
baseRef = CFCopyLocalizedString(CFSTR("NPROMNameMes"), "NPROM");
mesRef = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, baseRef);
@ -1168,7 +1168,7 @@ static void NPClientBeginPlayerListSheet (void)
{
cid.id = npcinfo[i].player;
HIViewFindByID(root, cid, &ctl);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npcinfo[i].name, MAC_PATH_ENCODING);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npcinfo[i].name, kCFStringEncodingUTF8);
if (ref)
{
SetStaticTextCFString(ctl, ref, false);

View File

@ -192,5 +192,10 @@
#define _mac_cocoatools_h_
void CocoaPlayFreezeDefrostSound (void);
void CocoaAddStatTextToView (NSView *, NSString *, float, float, float, float, NSTextField **);
void CocoaAddEditTextToView (NSView *, NSString *, float, float, float, float, NSTextField **);
void CocoaAddMPushBtnToView (NSView *, NSString *, float, float, float, float, NSButton **);
void CocoaAddCheckBoxToView (NSView *, NSString *, float, float, float, float, NSButton **);
void CocoaAddPopUpBtnToView (NSView *, NSArray *, float, float, float, float, NSPopUpButton **);
#endif

View File

@ -188,7 +188,7 @@
***********************************************************************************/
#import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#import "mac-cocoatools.h"
@ -217,3 +217,114 @@ void CocoaPlayFreezeDefrostSound (void)
[pool release];
}
void CocoaAddStatTextToView (NSView *view, NSString *label, float x, float y, float w, float h, NSTextField **out)
{
NSTextField *control;
control = [[[NSTextField alloc] init] autorelease];
[[control cell] setControlSize: NSSmallControlSize];
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
[control setStringValue: NSLocalizedString(label, @"")];
[control setBezeled: NO];
[control setDrawsBackground: NO];
[control setEditable: NO];
[control setSelectable: NO];
[view addSubview: control];
[control setFrame: NSMakeRect(x, y, w, h)];
if (out != NULL)
*out = control;
}
void CocoaAddEditTextToView (NSView *view, NSString *label, float x, float y, float w, float h, NSTextField **out)
{
NSTextField *control;
control = [[[NSTextField alloc] init] autorelease];
[[control cell] setControlSize: NSSmallControlSize];
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
[control setStringValue: NSLocalizedString(label, @"")];
[control setBezeled: YES];
[control setDrawsBackground: YES];
[control setEditable: YES];
[control setSelectable: YES];
[view addSubview: control];
[control setFrame: NSMakeRect(x, y, w, h)];
if (out != NULL)
*out = control;
}
void CocoaAddMPushBtnToView (NSView *view, NSString *label, float x, float y, float w, float h, NSButton **out)
{
NSButton *control;
control = [[[NSButton alloc] init] autorelease];
[[control cell] setControlSize: NSSmallControlSize];
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
[control setTitle: NSLocalizedString(label, @"")];
[control setBezelStyle: NSRoundedBezelStyle];
[control setButtonType: NSMomentaryPushInButton];
[view addSubview: control];
[control setFrame: NSMakeRect(x, y, w, h)];
if (out != NULL)
*out = control;
}
void CocoaAddCheckBoxToView (NSView *view, NSString *label, float x, float y, float w, float h, NSButton **out)
{
NSButton *control;
control = [[[NSButton alloc] init] autorelease];
[[control cell] setControlSize: NSSmallControlSize];
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
[control setTitle: NSLocalizedString(label, @"")];
[control setButtonType: NSSwitchButton];
[view addSubview: control];
[control setFrame: NSMakeRect(x, y, w, h)];
if (out != NULL)
*out = control;
}
void CocoaAddPopUpBtnToView (NSView *view, NSArray *array, float x, float y, float w, float h, NSPopUpButton **out)
{
NSPopUpButton *control;
NSMenu *menu;
int n;
menu = [[[NSMenu alloc] init] autorelease];
n = [array count];
for (int i = 0; i < n; i++)
{
NSString *item = [array objectAtIndex: i];
if ([item isEqualToString: @"---"])
[menu addItem: [NSMenuItem separatorItem]];
else
[menu addItemWithTitle: item action: NULL keyEquivalent: @""];
}
control = [[[NSPopUpButton alloc] init] autorelease];
[[control cell] setControlSize: NSSmallControlSize];
[control setFont: [NSFont systemFontOfSize: [NSFont systemFontSizeForControlSize: NSSmallControlSize]]];
[control setPullsDown: NO];
[control setMenu: menu];
[view addSubview: control];
[control setFrame: NSMakeRect(x, y, w, h)];
if (out != NULL)
*out = control;
}

View File

@ -626,10 +626,7 @@ void ConfigureCoreImageFilter (void)
int n = CountMenuItems(ciFilterMenu);
SetControlPopupMenuHandle(ctl, ciFilterMenu);
HIViewSetMaximum(ctl, n);
for (int i = 1; i <= n; i++)
CheckMenuItem(ciFilterMenu, i, false);
value = [ciFilterNameList indexOfObject: (NSString *) ciFilterName];
CheckMenuItem(ciFilterMenu, value + 1, true);
HIViewSetValue(ctl, value + 1);
ReplaceFilterUI(window);

View File

@ -204,6 +204,7 @@
static void AddFolderIcon (FSRef *, const char *);
static OSStatus FindSNESFolder (FSRef *, char *, const char *);
static OSStatus FindApplicationSupportFolder (FSRef *, char *, const char *);
static OSStatus FindCustomFolder (FSRef *, char *, const char *);
static OSStatus FindSNESFolder (FSRef *folderRef, char *folderPath, const char *folderName)
@ -223,17 +224,20 @@ static OSStatus FindSNESFolder (FSRef *folderRef, char *folderPath, const char *
r = CFURLGetFSRef(purl, &pref);
err = FSMakeFSRefUnicode(&pref, CFStringGetLength(fstr), buffer, kTextEncodingUnicodeDefault, folderRef);
if (err == dirNFErr || err == fnfErr)
if (err == dirNFErr || err == fnfErr)
{
err = FSCreateDirectoryUnicode(&pref, CFStringGetLength(fstr), buffer, kFSCatInfoNone, NULL, folderRef, NULL, NULL);
if (err == noErr)
AddFolderIcon(folderRef, folderName);
}
if (err != noErr && !folderWarning)
if (err)
{
AppearanceAlert(kAlertCautionAlert, kFolderFail, kFolderHint);
folderWarning = true;
if (!folderWarning)
{
AppearanceAlert(kAlertCautionAlert, kFolderFail, kFolderHint);
folderWarning = true;
}
}
else
err = FSRefMakePath(folderRef, (unsigned char *) folderPath, PATH_MAX);
@ -265,6 +269,7 @@ static OSStatus FindApplicationSupportFolder (FSRef *folderRef, char *folderPath
if (err == dirNFErr || err == fnfErr)
err = FSCreateDirectoryUnicode(&p2ref, 6, s9xfolder, kFSCatInfoNone, NULL, &p1ref, NULL, NULL);
}
if (err)
return (err);
@ -272,17 +277,62 @@ static OSStatus FindApplicationSupportFolder (FSRef *folderRef, char *folderPath
CFStringGetCharacters(fstr, CFRangeMake(0, CFStringGetLength(fstr)), buffer);
err = FSMakeFSRefUnicode(&p1ref, CFStringGetLength(fstr), buffer, kTextEncodingUnicodeDefault, folderRef);
if (err == dirNFErr || err == fnfErr)
if (err == dirNFErr || err == fnfErr)
{
err = FSCreateDirectoryUnicode(&p1ref, CFStringGetLength(fstr), buffer, kFSCatInfoNone, NULL, folderRef, NULL, NULL);
if (err == noErr)
AddFolderIcon(folderRef, folderName);
}
if (err != noErr && !folderWarning)
if (err)
{
AppearanceAlert(kAlertCautionAlert, kFolderFail, kFolderHint);
folderWarning = true;
if (!folderWarning)
{
AppearanceAlert(kAlertCautionAlert, kFolderFail, kFolderHint);
folderWarning = true;
}
}
else
err = FSRefMakePath(folderRef, (unsigned char *) folderPath, PATH_MAX);
CFRelease(fstr);
return (err);
}
static OSStatus FindCustomFolder (FSRef *folderRef, char *folderPath, const char *folderName)
{
OSStatus err;
CFStringRef fstr;
FSRef pref;
UniChar buffer[PATH_MAX + 1];
char s[PATH_MAX + 1];
err = CFStringGetCString(saveFolderPath, s, PATH_MAX, kCFStringEncodingUTF8) ? noErr : -1;
if (err == noErr)
err = FSPathMakeRef((unsigned char *) s, &pref, NULL);
if (err)
return (err);
fstr = CFStringCreateWithCString(kCFAllocatorDefault, folderName, CFStringGetSystemEncoding());
CFStringGetCharacters(fstr, CFRangeMake(0, CFStringGetLength(fstr)), buffer);
err = FSMakeFSRefUnicode(&pref, CFStringGetLength(fstr), buffer, kTextEncodingUnicodeDefault, folderRef);
if (err == dirNFErr || err == fnfErr)
{
err = FSCreateDirectoryUnicode(&pref, CFStringGetLength(fstr), buffer, kFSCatInfoNone, NULL, folderRef, NULL, NULL);
if (err == noErr)
AddFolderIcon(folderRef, folderName);
}
if (err)
{
if (!folderWarning)
{
AppearanceAlert(kAlertCautionAlert, kFolderFail, kFolderHint);
folderWarning = true;
}
}
else
err = FSRefMakePath(folderRef, (unsigned char *) folderPath, PATH_MAX);
@ -472,6 +522,9 @@ const char * S9xGetFilename (const char *inExt, enum s9x_getdirtype dirtype)
if (saveInROMFolder == 0)
err = FindSNESFolder(&ref, s, folderName);
else
if (saveFolderPath && (saveInROMFolder == 4))
err = FindCustomFolder(&ref, s, folderName);
else
err = FindApplicationSupportFolder(&ref, s, folderName);

View File

@ -198,10 +198,8 @@
#define ZLIB
#define UNZIP_SUPPORT
#define JMA_SUPPORT
#define CPU_SHUTDOWN
#define USE_OPENGL
#define RIGHTSHIFT_IS_SAR
#define CORRECT_VRAM_READS
#define HAVE_STDINT_H
//#define DEBUGGER

View File

@ -666,7 +666,7 @@ static pascal OSStatus MultiCartPaneEventHandler (EventHandlerCallRef inHandlerR
cid.signature = 'MNAM';
HIViewFindByID(view, cid, &ctl);
url = CFURLCreateWithBytes(kCFAllocatorDefault, data, dataSize, MAC_PATH_ENCODING, NULL);
url = CFURLCreateWithBytes(kCFAllocatorDefault, data, dataSize, kCFStringEncodingUTF8, NULL);
str = CFURLCopyLastPathComponent(url);
SetStaticTextCFString(ctl, str, true);
CFRelease(str);

17
macosx/mac-musicbox.cpp Normal file → Executable file
View File

@ -230,7 +230,7 @@ static pthread_t mbxThread;
static uint16 stereo_switch;
static volatile Boolean stopNow, showIndicator, mbxFinished;
static volatile Boolean stopNow, showIndicator, mbxFinished, headPressed;
static void SPCPlayExec (void);
static void SPCPlayFreeze (void);
@ -300,6 +300,7 @@ void MusicBoxDialog (void)
mboxPause = false;
mbxFinished = false;
showIndicator = false;
headPressed = false;
stereo_switch = ~0;
spc_core->dsp_set_stereo_switch(stereo_switch);
@ -327,7 +328,7 @@ void MusicBoxDialog (void)
HIViewFindByID(root, cid, &ctl);
SetStaticTextTrunc(ctl, truncEnd, false);
_splitpath(Memory.ROMFilename, drive, dir, fname, ext);
sref = CFStringCreateWithCString(kCFAllocatorDefault, fname, MAC_PATH_ENCODING);
sref = CFStringCreateWithCString(kCFAllocatorDefault, fname, kCFStringEncodingUTF8);
if (sref)
{
SetStaticTextCFString(ctl, sref, false);
@ -596,9 +597,7 @@ static pascal OSStatus MusicBoxEventHandler (EventHandlerCallRef inHandlerCallRe
case 'HEAD':
{
showIndicator = !showIndicator;
SPCPlayDefrost();
showIndicator = !showIndicator;
headPressed = true;
result = noErr;
break;
}
@ -641,6 +640,14 @@ static void * SoundTask (void *)
S9xMainLoop();
}
if (headPressed)
{
showIndicator = !showIndicator;
SPCPlayDefrost();
showIndicator = !showIndicator;
headPressed = false;
}
last += (1000000 / Memory.ROMFramesPerSecond);
Microseconds((UnsignedWide *) &curt);

View File

@ -307,6 +307,7 @@ extern uint32 macSoundBuffer_ms, macSoundInterval_ms;
extern bool8 macSoundLagEnable;
extern uint16 aueffect;
extern uint8 saveInROMFolder;
extern CFStringRef saveFolderPath;
extern int macCurvatureWarp, macAspectRatio;
extern int macFastForwardRate, macFrameAdvanceRate;
extern int inactiveMode;

View File

@ -188,48 +188,49 @@
***********************************************************************************/
#include "snes9x.h"
#include "memmap.h"
#include "apu.h"
#include "controls.h"
#include "crosshairs.h"
#include "cheats.h"
#include "movie.h"
#include "display.h"
#include "blit.h"
#import "snes9x.h"
#import "memmap.h"
#import "apu.h"
#import "controls.h"
#import "crosshairs.h"
#import "cheats.h"
#import "movie.h"
#import "display.h"
#import "blit.h"
#ifdef DEBUGGER
#include "debug.h"
#import "debug.h"
#endif
#include <QuickTime/QuickTime.h>
#include <pthread.h>
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <pthread.h>
#include "mac-prefix.h"
#include "mac-appleevent.h"
#include "mac-audio.h"
#include "mac-cheat.h"
#include "mac-cheatfinder.h"
#include "mac-client.h"
#include "mac-cocoatools.h"
#include "mac-controls.h"
#include "mac-coreimage.h"
#include "mac-dialog.h"
#include "mac-file.h"
#include "mac-gworld.h"
#include "mac-joypad.h"
#include "mac-keyboard.h"
#include "mac-multicart.h"
#include "mac-musicbox.h"
#include "mac-netplay.h"
#include "mac-prefs.h"
#include "mac-quicktime.h"
#include "mac-render.h"
#include "mac-screenshot.h"
#include "mac-server.h"
#include "mac-snes9x.h"
#include "mac-stringtools.h"
#include "mac-os.h"
#import "mac-prefix.h"
#import "mac-appleevent.h"
#import "mac-audio.h"
#import "mac-cheat.h"
#import "mac-cheatfinder.h"
#import "mac-client.h"
#import "mac-cocoatools.h"
#import "mac-controls.h"
#import "mac-coreimage.h"
#import "mac-dialog.h"
#import "mac-file.h"
#import "mac-gworld.h"
#import "mac-joypad.h"
#import "mac-keyboard.h"
#import "mac-multicart.h"
#import "mac-musicbox.h"
#import "mac-netplay.h"
#import "mac-prefs.h"
#import "mac-quicktime.h"
#import "mac-render.h"
#import "mac-screenshot.h"
#import "mac-server.h"
#import "mac-snes9x.h"
#import "mac-stringtools.h"
#import "mac-os.h"
#define kRecentMenu_MAX 20
#define KeyIsPressed(km, k) (1 & (((unsigned char *) km) [(k) >> 3] >> ((k) & 7)))
@ -246,10 +247,10 @@ SInt32 systemVersion;
uint32 controlPad[MAC_MAX_PLAYERS];
uint8 romDetect = kAutoROMType,
interleaveDetect = kAutoInterleave,
videoDetect = kAutoVideo,
headerDetect = kAutoHeader;
uint8 romDetect = 0,
interleaveDetect = 0,
videoDetect = 0,
headerDetect = 0;
WindowRef gWindow = NULL;
HIRect gWindowRect;
@ -302,6 +303,7 @@ bool8 macSoundLagEnable = false;
uint16 aueffect = 0;
uint8 saveInROMFolder = 2; // 0 : Snes9x 1 : ROM 2 : Application Support
CFStringRef saveFolderPath;
int macCurvatureWarp = 15,
macAspectRatio = 0;
@ -944,7 +946,7 @@ void InitGameWindow (void)
err = InstallControlEventHandler(ctl, gameWUPaneUPP, GetEventTypeCount(wupaneEvents), wupaneEvents, (void *) gWindow, &gameWUPaneEventRef);
_splitpath(Memory.ROMFilename, drive, dir, fname, ext);
ref = CFStringCreateWithCString(kCFAllocatorDefault, fname, MAC_PATH_ENCODING);
ref = CFStringCreateWithCString(kCFAllocatorDefault, fname, kCFStringEncodingUTF8);
if (ref)
{
SetWindowTitleWithCFString(gWindow, ref);
@ -1322,7 +1324,7 @@ void AddRecentItem (FSRef *ref)
{
CFStringRef pathRef;
pathRef = CFStringCreateWithCString(kCFAllocatorDefault, path, MAC_PATH_ENCODING);
pathRef = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);
if (pathRef)
{
int i, j;
@ -1392,7 +1394,7 @@ void BuildRecentMenu (void)
Boolean r;
char path[PATH_MAX + 1];
r = CFStringGetCString(recentItem[i], path, PATH_MAX, MAC_PATH_ENCODING);
r = CFStringGetCString(recentItem[i], path, PATH_MAX, kCFStringEncodingUTF8);
if (r)
{
CFStringRef nameRef;
@ -1400,7 +1402,7 @@ void BuildRecentMenu (void)
_splitpath(path, drive, dir, fname, ext);
snprintf(path, PATH_MAX + 1, "%s%s", fname, ext);
nameRef = CFStringCreateWithCString(kCFAllocatorDefault, path, MAC_PATH_ENCODING);
nameRef = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);
if (nameRef)
{
err = AppendMenuItemTextWithCFString(recentMenu, nameRef, 0, 'FRe0' + i, NULL);
@ -1611,7 +1613,7 @@ static OSStatus HandleMenuChoice (UInt32 command, Boolean *done)
char path[PATH_MAX + 1];
index = (int) (command & 0x000000FF) - (int) '0';
r = CFStringGetCString(recentItem[index], path, PATH_MAX, MAC_PATH_ENCODING);
r = CFStringGetCString(recentItem[index], path, PATH_MAX, kCFStringEncodingUTF8);
if (r)
{
FSRef ref;
@ -3049,7 +3051,7 @@ void GetGameScreenPointer (int16 *x, int16 *y, bool fullmouse)
{
float fpw = (float) glScreenH / (float) ph * 512.0f;
scopeViewInfo.width = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
scopeViewInfo.width = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
scopeViewInfo.height = glScreenH;
scopeViewInfo.globalLeft = (int) glScreenBounds.origin.x + ((glScreenW - scopeViewInfo.width) >> 1);
scopeViewInfo.globalTop = (int) glScreenBounds.origin.y;
@ -3127,6 +3129,8 @@ static void Initialize (void)
printf("OS: %x QuickTime: %x\n\n", (unsigned) systemVersion, (unsigned) qtVersion);
NSApplicationLoad();
ZeroMemory(&Settings, sizeof(Settings));
Settings.MouseMaster = true;
Settings.SuperScopeMaster = true;
@ -3168,6 +3172,8 @@ static void Initialize (void)
npServerIP[0] = 0;
npName[0] = 0;
saveFolderPath = NULL;
CreateIconImages();
InitAppleEvents();

3
macosx/mac-prefix.h Normal file → Executable file
View File

@ -191,13 +191,12 @@
#ifndef _mac_prefix_h_
#define _mac_prefix_h_
#define MAC_PATH_ENCODING kCFStringEncodingUTF8
#define MAC_PATH_SEPARATOR "/"
#define MAC_PATH_SEP_CHAR '/'
#define kMacS9XCFString CFSTR("Snes9x")
#define MAC_VERSION "100"
#define MAC_VERSION "102"
#include <Carbon/Carbon.h>

277
macosx/mac-prefs.cpp Normal file → Executable file
View File

@ -199,10 +199,12 @@
#include "mac-prefix.h"
#include "mac-audio.h"
#include "mac-cart.h"
#include "mac-coreimage.h"
#include "mac-dialog.h"
#include "mac-keyboard.h"
#include "mac-os.h"
#include "mac-render.h"
#include "mac-snes9x.h"
#include "mac-stringtools.h"
#include "mac-prefs.h"
@ -224,6 +226,7 @@ enum
iNibGScreenCurvature,
iNibGCurvatureWarp,
iNibGAspectRatio,
iNibGAspectRatioText,
iNibSSynchronize = 201,
iNibS16BitPlayback,
@ -241,7 +244,7 @@ enum
iNibOAutoSaveInterval,
iNibMCPUCycles = 601,
iNibMShutdownMaster,
iNibMReserved1,
iNibMTurboSkipArrows,
iNibMTurboSkipText,
iNibMFrameSkip,
@ -281,6 +284,11 @@ enum
iOpenGLNTSC_TV_MMode
};
enum
{
iNibSaveFolderNameMenuItem = 5
};
static int lastTabIndex = 1;
static int tabList[] = { 5, 129, 130, 131, 132, 133 };
@ -329,7 +337,6 @@ static PrefList prefList[] =
{ 'QTfg', &macQTMovFlag, sizeof(uint16 ) },
{ 'HHck', &Settings.HDMATimingHack, sizeof(int32 ) },
{ 'stdm', &Settings.ShutdownMaster, sizeof(bool8 ) },
{ 'TbRt', &macFastForwardRate, sizeof(int ) },
{ 'FSkp', &macFrameSkip, sizeof(int ) },
{ 'IvVR', &Settings.BlockInvalidVRAMAccessMaster, sizeof(bool8 ) },
@ -375,6 +382,7 @@ static void SelectTabPane (HIViewRef, SInt16);
static pascal void InputRateSliderActionProc (HIViewRef, HIViewPartCode);
static pascal void LittleArrowsActionProc (HIViewRef, HIViewPartCode);
static pascal OSStatus InputRateTextEventHandler (EventHandlerCallRef, EventRef, void *);
static pascal OSStatus AspectRatioTextEventHandler (EventHandlerCallRef, EventRef, void *);
static pascal OSStatus TabEventHandler (EventHandlerCallRef, EventRef, void *);
static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef, EventRef, void *);
@ -409,6 +417,20 @@ void SavePrefs (void)
}
}
mref = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFSTR("Preferences_SaveFolder"));
if (mref)
{
if (saveFolderPath)
{
CFPreferencesSetAppValue(mref, saveFolderPath, kCFPreferencesCurrentApplication);
CFRelease(saveFolderPath);
}
else
CFPreferencesSetAppValue(mref, NULL, kCFPreferencesCurrentApplication);
CFRelease(mref);
}
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
}
@ -442,6 +464,16 @@ void LoadPrefs (void)
CFRelease(mref);
}
}
mref = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFSTR("Preferences_SaveFolder"));
if (mref)
{
sref = (CFStringRef) CFPreferencesCopyAppValue(mref, kCFPreferencesCurrentApplication);
if (sref)
saveFolderPath = sref;
CFRelease(mref);
}
}
void ConfigurePreferences (void)
@ -476,10 +508,11 @@ void ConfigurePreferences (void)
err = CreateWindowFromNib(nibRef, CFSTR("Preferences"), &tWindowRef);
if (err == noErr)
{
EventHandlerUPP tUPP, iUPP, pUPP;
EventHandlerRef tRef, iRef, pRef;
EventHandlerUPP tUPP, iUPP, aUPP, pUPP;
EventHandlerRef tRef, iRef, aRef, pRef;
EventTypeSpec tEvents[] = { { kEventClassControl, kEventControlHit } },
iEvents[] = { { kEventClassControl, kEventControlClick } },
aEvents[] = { { kEventClassControl, kEventControlClick } },
pEvents[] = { { kEventClassWindow, kEventWindowClose },
{ kEventClassCommand, kEventCommandProcess },
{ kEventClassCommand, kEventCommandUpdateStatus } };
@ -505,6 +538,12 @@ void ConfigurePreferences (void)
iUPP = NewEventHandlerUPP(InputRateTextEventHandler);
err = InstallControlEventHandler(ctl, iUPP, GetEventTypeCount(iEvents), iEvents, 0, &iRef);
cid.signature = 'grap';
cid.id = iNibGAspectRatioText;
HIViewFindByID(root, cid, &ctl);
aUPP = NewEventHandlerUPP(AspectRatioTextEventHandler);
err = InstallControlEventHandler(ctl, aUPP, GetEventTypeCount(aEvents), aEvents, 0, &aRef);
pUPP = NewEventHandlerUPP(PreferencesEventHandler);
err = InstallWindowEventHandler(tWindowRef, pUPP, GetEventTypeCount(pEvents), pEvents, (void *) tWindowRef, &pRef);
@ -539,98 +578,77 @@ void ConfigurePreferences (void)
cid.id = iNibGVideoMode;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
switch (videoMode)
{
case VIDEOMODE_BLOCKY:
CheckMenuItem(menu, iOpenGLBlocky, true);
SetControl32BitValue(ctl, iOpenGLBlocky);
break;
case VIDEOMODE_TV:
CheckMenuItem(menu, iOpenGLTVMode, true);
SetControl32BitValue(ctl, iOpenGLTVMode);
break;
case VIDEOMODE_SMOOTH:
CheckMenuItem(menu, iOpenGLSmoothMode, true);
SetControl32BitValue(ctl, iOpenGLSmoothMode);
break;
case VIDEOMODE_SUPEREAGLE:
CheckMenuItem(menu, iOpenGLEagleMode, true);
SetControl32BitValue(ctl, iOpenGLEagleMode);
break;
case VIDEOMODE_2XSAI:
CheckMenuItem(menu, iOpenGL2xSAIMode, true);
SetControl32BitValue(ctl, iOpenGL2xSAIMode);
break;
case VIDEOMODE_SUPER2XSAI:
CheckMenuItem(menu, iOpenGLSuper2xSAIMode, true);
SetControl32BitValue(ctl, iOpenGLSuper2xSAIMode);
break;
case VIDEOMODE_EPX:
CheckMenuItem(menu, iOpenGLEPXMode, true);
SetControl32BitValue(ctl, iOpenGLEPXMode);
break;
case VIDEOMODE_HQ2X:
CheckMenuItem(menu, iOpenGLHQ2xMode, true);
SetControl32BitValue(ctl, iOpenGLHQ2xMode);
break;
case VIDEOMODE_HQ3X:
CheckMenuItem(menu, iOpenGLHQ3xMode, true);
SetControl32BitValue(ctl, iOpenGLHQ3xMode);
break;
case VIDEOMODE_HQ4X:
CheckMenuItem(menu, iOpenGLHQ4xMode, true);
SetControl32BitValue(ctl, iOpenGLHQ4xMode);
break;
case VIDEOMODE_NTSC_C:
CheckMenuItem(menu, iOpenGLNTSC_CMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_CMode);
break;
case VIDEOMODE_NTSC_S:
CheckMenuItem(menu, iOpenGLNTSC_SMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_SMode);
break;
case VIDEOMODE_NTSC_R:
CheckMenuItem(menu, iOpenGLNTSC_RMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_RMode);
break;
case VIDEOMODE_NTSC_M:
CheckMenuItem(menu, iOpenGLNTSC_MMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_MMode);
break;
case VIDEOMODE_NTSC_TV_C:
CheckMenuItem(menu, iOpenGLNTSC_TV_CMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_TV_CMode);
break;
case VIDEOMODE_NTSC_TV_S:
CheckMenuItem(menu, iOpenGLNTSC_TV_SMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_TV_SMode);
break;
case VIDEOMODE_NTSC_TV_R:
CheckMenuItem(menu, iOpenGLNTSC_TV_RMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_TV_RMode);
break;
case VIDEOMODE_NTSC_TV_M:
CheckMenuItem(menu, iOpenGLNTSC_TV_MMode, true);
SetControl32BitValue(ctl, iOpenGLNTSC_TV_MMode);
break;
}
@ -698,53 +716,41 @@ void ConfigurePreferences (void)
cid.id = iNibSPlaybackRate;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
switch (Settings.SoundPlaybackRate)
{
case 48000:
CheckMenuItem(menu, 1, true);
SetControl32BitValue(ctl, 1);
break;
case 44100:
CheckMenuItem(menu, 2, true);
SetControl32BitValue(ctl, 2);
break;
case 35000:
CheckMenuItem(menu, 3, true);
SetControl32BitValue(ctl, 3);
break;
case 32000:
CheckMenuItem(menu, 4, true);
SetControl32BitValue(ctl, 4);
break;
case 30000:
CheckMenuItem(menu, 5, true);
SetControl32BitValue(ctl, 5);
break;
case 22050:
CheckMenuItem(menu, 6, true);
SetControl32BitValue(ctl, 6);
break;
case 16000:
CheckMenuItem(menu, 7, true);
SetControl32BitValue(ctl, 7);
break;
case 11025:
CheckMenuItem(menu, 8, true);
SetControl32BitValue(ctl, 8);
break;
case 8000:
CheckMenuItem(menu, 9, true);
SetControl32BitValue(ctl, 9);
break;
}
@ -761,44 +767,32 @@ void ConfigurePreferences (void)
cid.id = iNibSInterval;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
switch (macSoundInterval_ms)
{
case 8:
CheckMenuItem(menu, 1, true);
SetControl32BitValue(ctl, 1);
break;
case 16:
CheckMenuItem(menu, 2, true);
SetControl32BitValue(ctl, 2);
break;
case 32:
CheckMenuItem(menu, 3, true);
SetControl32BitValue(ctl, 3);
break;
case 64:
CheckMenuItem(menu, 4, true);
SetControl32BitValue(ctl, 4);
break;
case 0:
default:
CheckMenuItem(menu, 6, true);
SetControl32BitValue(ctl, 6);
break;
}
cid.id = iNibSBufferSize;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
CheckMenuItem(menu, macSoundBuffer_ms / 20, true);
SetControl32BitValue(ctl, macSoundBuffer_ms / 20);
cid.id = iNibSAllowLag;
@ -813,24 +807,28 @@ void ConfigurePreferences (void)
cid.id = iNibOSaveFolder;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
if (saveInROMFolder == 1)
SetControl32BitValue(ctl, saveInROMFolder + 1);
err = GetControlData(ctl, kControlMenuPart, kControlPopupButtonMenuRefTag, sizeof(MenuRef), &menu, NULL);
if (saveFolderPath)
{
CheckMenuItem(menu, 2, true);
SetControl32BitValue(ctl, 2);
}
else
if (saveInROMFolder == 0)
{
CheckMenuItem(menu, 1, true);
SetControl32BitValue(ctl, 1);
CFURLRef url;
CFStringRef ref;
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, saveFolderPath, kCFURLPOSIXPathStyle, true);
ref = CFURLCopyLastPathComponent(url);
err = SetMenuItemTextWithCFString(menu, iNibSaveFolderNameMenuItem, ref);
CFRelease(ref);
CFRelease(url);
EnableMenuItem(menu, iNibSaveFolderNameMenuItem);
}
else
{
CheckMenuItem(menu, 3, true);
SetControl32BitValue(ctl, 3);
CFStringRef ref;
ref = CFCopyLocalizedString(CFSTR("NoneSelected"), "NoneSelected");
err = SetMenuItemTextWithCFString(menu, iNibSaveFolderNameMenuItem, ref);
CFRelease(ref);
DisableMenuItem(menu, iNibSaveFolderNameMenuItem);
}
cid.id = iNibOAutoSaveInterval;
@ -845,10 +843,6 @@ void ConfigurePreferences (void)
sprintf(num, "%" PRIi32, Settings.HDMATimingHack);
SetEditTextCStr(ctl, num, false);
cid.id = iNibMShutdownMaster;
HIViewFindByID(root, cid, &ctl);
SetControl32BitValue(ctl, Settings.ShutdownMaster);
cid.id = iNibMTurboSkipArrows;
HIViewFindByID(root, cid, &ctl);
SetControl32BitValue(ctl, macFastForwardRate);
@ -861,10 +855,6 @@ void ConfigurePreferences (void)
cid.id = iNibMFrameSkip;
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
CheckMenuItem(menu, macFrameSkip + 2, true);
SetControl32BitValue(ctl, macFrameSkip + 2);
cid.id = iNibMAllowInvalidVRAMAccess;
@ -1181,14 +1171,7 @@ void ConfigurePreferences (void)
cid.id = iNibOSaveFolder;
HIViewFindByID(root, cid, &ctl);
int saveto = GetControl32BitValue(ctl);
if (saveto == 2)
saveInROMFolder = 1;
else
if (saveto == 1)
saveInROMFolder = 0;
else
saveInROMFolder = 3;
saveInROMFolder = GetControl32BitValue(ctl) - 1;
cid.id = iNibOAutoSaveInterval;
HIViewFindByID(root, cid, &ctl);
@ -1204,10 +1187,6 @@ void ConfigurePreferences (void)
if ((Settings.HDMATimingHack <= 0) || (Settings.HDMATimingHack >= 200))
Settings.HDMATimingHack = 100;
cid.id = iNibMShutdownMaster;
HIViewFindByID(root, cid, &ctl);
Settings.ShutdownMaster = GetControl32BitValue(ctl) ? true : false;
cid.id = iNibMTurboSkipArrows;
HIViewFindByID(root, cid, &ctl);
macFastForwardRate = GetControl32BitValue(ctl);
@ -1268,6 +1247,9 @@ void ConfigurePreferences (void)
err = RemoveEventHandler(pRef);
DisposeEventHandlerUPP(pUPP);
err = RemoveEventHandler(aRef);
DisposeEventHandlerUPP(aUPP);
err = RemoveEventHandler(iRef);
DisposeEventHandlerUPP(iUPP);
@ -1392,6 +1374,36 @@ static pascal OSStatus InputRateTextEventHandler (EventHandlerCallRef inHandlerR
return (result);
}
static pascal OSStatus AspectRatioTextEventHandler (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData)
{
OSStatus err, result = eventNotHandledErr;
HIViewRef ctl, slider;
HIViewID cid;
float w, h, v;
int iw, ih;
err = GetEventParameter(inEvent, kEventParamDirectObject, typeControlRef, NULL, sizeof(ControlRef), NULL, &ctl);
if (err == noErr)
{
cid.signature = 'grap';
cid.id = iNibGAspectRatio;
HIViewFindByID(HIViewGetSuperview(ctl), cid, &slider);
GetGameDisplay(&iw, &ih);
w = (float) iw;
h = (float) ih;
v = (float) SNES_WIDTH / (float) SNES_HEIGHT * h;
macAspectRatio = (int) (((4.0f / 3.0f) * h - v) / (w - v) * 10000.0f);
SetControl32BitValue(slider, macAspectRatio);
result = noErr;
}
return (result);
}
static pascal OSStatus TabEventHandler (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData)
{
OSStatus err, result = eventNotHandledErr;
@ -1423,22 +1435,28 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
switch (GetEventClass(inEvent))
{
case kEventClassWindow:
{
switch (GetEventKind(inEvent))
{
case kEventWindowClose:
{
QuitAppModalLoopForWindow(tWindowRef);
result = noErr;
break;
}
}
break;
}
case kEventClassCommand:
{
switch (GetEventKind(inEvent))
{
HICommand tHICommand;
case kEventCommandUpdateStatus:
{
err = GetEventParameter(inEvent, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &tHICommand);
if (err == noErr && tHICommand.commandID == 'clos')
{
@ -1447,11 +1465,15 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
}
break;
}
case kEventCommandProcess:
{
HIViewRef ctl, root;
HIViewID cid;
SInt32 value;
FSRef ref;
bool8 r;
root = HIViewGetRoot(tWindowRef);
@ -1461,14 +1483,17 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
switch (tHICommand.commandID)
{
case 'S_EF':
{
HideWindow(tWindowRef);
ConfigureSoundEffects();
ShowWindow(tWindowRef);
result = noErr;
break;
}
case 'G_FL':
{
if (systemVersion >= 0x1040)
{
HideWindow(tWindowRef);
@ -1478,8 +1503,10 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
result = noErr;
break;
}
case 'G__7':
{
cid.signature = 'grap';
cid.id = iNibGGLStretch;
HIViewFindByID(root, cid, &ctl);
@ -1494,8 +1521,10 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
result = noErr;
break;
}
case 'G_13':
{
cid.signature = 'grap';
cid.id = iNibGScreenCurvature;
HIViewFindByID(root, cid, &ctl);
@ -1510,8 +1539,10 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
result = noErr;
break;
}
case 'S__3':
{
cid.signature = 'snd_';
cid.id = iNibSStereo;
HIViewFindByID(root, cid, &ctl);
@ -1526,13 +1557,88 @@ static pascal OSStatus PreferencesEventHandler (EventHandlerCallRef inHandlerRef
result = noErr;
break;
}
case 'F_FL':
{
UInt32 modifierkey;
err = GetEventParameter(inEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifierkey);
if (err == noErr)
{
if (modifierkey & optionKey)
{
CFStringRef str;
MenuRef menu;
str = CFCopyLocalizedString(CFSTR("NoneSelected"), "NoneSelected");
cid.signature = 'othe';
cid.id = iNibOSaveFolder;
HIViewFindByID(root, cid, &ctl);
SetControl32BitValue(ctl, 3);
err = GetControlData(ctl, kControlMenuPart, kControlPopupButtonMenuRefTag, sizeof(MenuRef), &menu, NULL);
err = SetMenuItemTextWithCFString(menu, iNibSaveFolderNameMenuItem, str);
DisableMenuItem(menu, iNibSaveFolderNameMenuItem);
HIViewSetNeedsDisplay(ctl, true);
CFRelease(str);
if (saveFolderPath)
CFRelease(saveFolderPath);
saveFolderPath = NULL;
}
else
r = NavBeginChooseFolderSheet(tWindowRef);
}
result = noErr;
break;
}
case 'NvDn':
{
r = NavEndChooseFolderSheet(&ref);
if (r)
{
CFStringRef str;
CFURLRef url;
MenuRef menu;
url = CFURLCreateFromFSRef(kCFAllocatorDefault, &ref);
str = CFURLCopyLastPathComponent(url);
cid.signature = 'othe';
cid.id = iNibOSaveFolder;
HIViewFindByID(root, cid, &ctl);
SetControl32BitValue(ctl, iNibSaveFolderNameMenuItem);
err = GetControlData(ctl, kControlMenuPart, kControlPopupButtonMenuRefTag, sizeof(MenuRef), &menu, NULL);
err = SetMenuItemTextWithCFString(menu, iNibSaveFolderNameMenuItem, str);
EnableMenuItem(menu, iNibSaveFolderNameMenuItem);
HIViewSetNeedsDisplay(ctl, true);
CFRelease(str);
str = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
if (saveFolderPath)
CFRelease(saveFolderPath);
saveFolderPath = str;
CFRelease(url);
}
result = noErr;
break;
}
}
}
break;
}
}
break;
}
}
return (result);
@ -1557,7 +1663,6 @@ void ConfigureExtraOptions (void)
{ kEventClassCommand, kEventCommandUpdateStatus } };
HIViewRef ctl, root;
HIViewID cid;
MenuRef menu;
root = HIViewGetRoot(tWindowRef);
cid.id = 0;
@ -1580,10 +1685,6 @@ void ConfigureExtraOptions (void)
cid.signature = 'Hint';
HIViewFindByID(root, cid, &ctl);
menu = HIMenuViewGetMenu(ctl);
for (int i = 1; i <= CountMenuItems(menu); i++)
CheckMenuItem(menu, i, false);
CheckMenuItem(menu, extraOptions.glStorageHint, true);
SetControl32BitValue(ctl, extraOptions.glStorageHint);
eventUPP = NewEventHandlerUPP(DefaultEventHandler);

View File

@ -299,14 +299,11 @@ static void MacQTCloseVideoComponent (ComponentInstance ci)
err = CloseComponent(ci);
}
void MacQTVideoConfig (WindowRef parent)
void MacQTVideoConfig (void)
{
OSStatus err;
ComponentInstance ci;
if (running)
return;
MacQTOpenVideoComponent(&ci);
long flag;
@ -316,7 +313,7 @@ void MacQTVideoConfig (WindowRef parent)
SCWindowSettings ws;
ws.size = sizeof(SCWindowSettings);
ws.windowRefKind = scWindowRefKindCarbon;
ws.parentWindow = parent;
ws.parentWindow = NULL;
err = SCSetInfo(ci, scWindowOptionsType, &ws);
err = SCRequestSequenceSettings(ci);
@ -353,7 +350,7 @@ void MacQTStartRecording (char *path)
// storage
str = CFStringCreateWithCString(kCFAllocatorDefault, path, MAC_PATH_ENCODING);
str = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, str, kCFURLPOSIXPathStyle, false);
err = QTNewDataReferenceFromCFURL(url, 0, &(sqt.dataRef), &(sqt.dataRefType));
CheckError(err, 21);

View File

@ -194,6 +194,6 @@
void MacQTStartRecording (char *);
void MacQTStopRecording (void);
void MacQTRecordFrame (int, int);
void MacQTVideoConfig (WindowRef);
void MacQTVideoConfig (void);
#endif

View File

@ -1459,18 +1459,15 @@ static void S9xDeinitCoreImage (void)
}
}
void S9xInitDisplay (int argc, char **argv)
void GetGameDisplay (int *w, int *h)
{
if (directDisplay)
return;
gGameDisplayID = CGMainDisplayID();
CGDisplayErr cgErr;
CGDisplayCount numDisplays, maxDisplays = 32;
CGDirectDisplayID activeDisplays[32];
CGPoint windowAt;
gGameDisplayID = CGMainDisplayID();
windowAt = CGPointMake((float) windowPos[kWindowScreen].h, (float) windowPos[kWindowScreen].v);
cgErr = CGGetDisplaysWithPoint(windowAt, maxDisplays, activeDisplays, &numDisplays);
@ -1483,6 +1480,20 @@ void S9xInitDisplay (int argc, char **argv)
}
}
if (w != NULL && h != NULL)
{
*w = CGDisplayPixelsWide(gGameDisplayID);
*h = CGDisplayPixelsHigh(gGameDisplayID);
}
}
void S9xInitDisplay (int argc, char **argv)
{
if (directDisplay)
return;
GetGameDisplay(NULL, NULL);
glScreenBounds = CGDisplayBounds(gGameDisplayID);
unlimitedCursor = CGPointMake(0.0f, 0.0f);
@ -1713,7 +1724,7 @@ static void S9xPutImageOpenGL (int width, int height)
if (glstretch)
{
float fpw = (float) glScreenH / vh * 512.0f;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
@ -1963,7 +1974,7 @@ static void S9xPutImageCoreImage (int width, int height)
if (glstretch)
{
float fpw = (float) glScreenH / vh * 512.0f;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
@ -2042,7 +2053,7 @@ static void S9xPutImageOverscanOpenGL (int width, int height)
if (glstretch)
{
float fpw = (float) glScreenH / vh * 512.0f;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
@ -2312,7 +2323,7 @@ static void S9xPutImageOverscanCoreImage (int width, int height)
if (glstretch)
{
float fpw = (float) glScreenH / vh * 512.0f;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
@ -2377,7 +2388,7 @@ static void S9xPutImageBlitGL2 (int blit_width, int blit_height)
{
int sh = (blit_width > blit_height * 2) ? (blit_height * 2) : blit_height;
float fpw = (float) glScreenH / (float) sh * (float) blit_width;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
else
@ -2543,7 +2554,7 @@ static void S9xPutImageBlitGL2CoreImage (int blit_width, int blit_height)
{
int sh = (blit_width > blit_height * 2) ? (blit_height * 2) : blit_height;
float fpw = (float) glScreenH / (float) sh * (float) blit_width;
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 100.0);
int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0);
glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH);
}
else

View File

@ -196,5 +196,6 @@ void DeinitGraphics (void);
void DrawPauseScreen (CGContextRef, HIRect);
void ClearGFXScreen (void);
void DrawFreezeDefrostScreen (uint8 *);
void GetGameDisplay (int *, int *);
#endif

View File

@ -282,7 +282,7 @@ static void ExportCGImageToPNGFile (CGImageRef image, const char *path)
Handle dataRef;
OSType dataRefType;
str = CFStringCreateWithCString(kCFAllocatorDefault, path, MAC_PATH_ENCODING);
str = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);
if (str)
{
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, str, kCFURLPOSIXPathStyle, false);

View File

@ -390,7 +390,7 @@ static pascal void NPServerDialogTimerHandler (EventLoopTimerRef inTimer, void *
HIViewFindByID(root, cid, &ctl);
if (npplayer[c].online)
{
ref = CFStringCreateWithCString(kCFAllocatorDefault, npplayer[c].ip, MAC_PATH_ENCODING);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npplayer[c].ip, kCFStringEncodingUTF8);
if (ref)
{
SetStaticTextCFString(ctl, ref, true);
@ -406,7 +406,7 @@ static pascal void NPServerDialogTimerHandler (EventLoopTimerRef inTimer, void *
HIViewFindByID(root, cid, &ctl);
if (npplayer[c].online)
{
ref = CFStringCreateWithCString(kCFAllocatorDefault, npplayer[c].name, MAC_PATH_ENCODING);
ref = CFStringCreateWithCString(kCFAllocatorDefault, npplayer[c].name, kCFStringEncodingUTF8);
if (ref)
{
SetStaticTextCFString(ctl, ref, true);
@ -598,7 +598,7 @@ void NPServerInit (void)
if (ref)
{
Boolean r;
r = CFStringGetCString(ref, npplayer[0].name, 256, MAC_PATH_ENCODING);
r = CFStringGetCString(ref, npplayer[0].name, 256, kCFStringEncodingUTF8);
if (!r)
strcpy(npplayer[0].name, "unknown");

2
macosx/mac-snes9x.cpp Normal file → Executable file
View File

@ -338,7 +338,7 @@ bool8 SNES9X_OpenMultiCart (void)
{
cart[i][0] = 0;
if (multiCartPath[i])
r = CFStringGetCString(multiCartPath[i], cart[i], PATH_MAX, MAC_PATH_ENCODING);
r = CFStringGetCString(multiCartPath[i], cart[i], PATH_MAX, kCFStringEncodingUTF8);
}
SNES9X_InitSound();

28
macosx/mac-snes9x.h Normal file → Executable file
View File

@ -193,32 +193,32 @@
enum
{
kAutoROMType = 0,
kLoROMForce,
kHiROMForce
kAutoROMType = 0,
kLoROMForce = 2,
kHiROMForce = 3
};
enum
{
kAutoInterleave = 0,
kNoInterleaveForce,
kInterleaveForce,
kInterleave2Force,
kInterleaveGD24
kAutoInterleave = 0,
kNoInterleaveForce = 2,
kInterleaveForce = 3,
kInterleave2Force = 4,
kInterleaveGD24 = 5
};
enum
{
kAutoVideo = 0,
kPALForce,
kNTSCForce
kAutoVideo = 0,
kPALForce = 2,
kNTSCForce = 3
};
enum
{
kAutoHeader = 0,
kNoHeaderForce,
kHeaderForce
kAutoHeader = 0,
kNoHeaderForce = 2,
kHeaderForce = 3
};
void SNES9X_Go (void);

59
macosx/snes9x.xcodeproj/project.pbxproj Normal file → Executable file
View File

@ -176,7 +176,7 @@
CF047DE9109D0E0600FD0754 /* winout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5F207609F76001BAB8B /* winout.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; };
CF047DEA109D0E0600FD0754 /* mac-appleevent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EACDDBB004D6A89700A80003 /* mac-appleevent.cpp */; };
CF047DEB109D0E0600FD0754 /* mac-audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EADE6347052E5C4300A80003 /* mac-audio.cpp */; };
CF047DEC109D0E0600FD0754 /* mac-cart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.cpp */; };
CF047DEC109D0E0600FD0754 /* mac-cart.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.mm */; };
CF047DED109D0E0600FD0754 /* mac-cheat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67204AC7FCE00A80003 /* mac-cheat.cpp */; };
CF047DEE109D0E0600FD0754 /* mac-cheatfinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67404AC7FCE00A80003 /* mac-cheatfinder.cpp */; };
CF047DEF109D0E0600FD0754 /* mac-client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA16051C0639E4C0004412AB /* mac-client.cpp */; };
@ -191,7 +191,7 @@
CF047DF8109D0E0600FD0754 /* mac-multicart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA26BBD50B3676E800A570B5 /* mac-multicart.cpp */; };
CF047DF9109D0E0600FD0754 /* mac-musicbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67F04AC7FCE00A80003 /* mac-musicbox.cpp */; };
CF047DFA109D0E0600FD0754 /* mac-netplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA1605500639E735004412AB /* mac-netplay.cpp */; };
CF047DFB109D0E0600FD0754 /* mac-os.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.cpp */; };
CF047DFB109D0E0600FD0754 /* mac-os.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.mm */; };
CF047DFC109D0E0600FD0754 /* mac-prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96B04D584B700A80003 /* mac-prefs.cpp */; };
CF047DFD109D0E0600FD0754 /* mac-quicktime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7F18506CB3D6F00C2D767 /* mac-quicktime.cpp */; };
CF047DFE109D0E0600FD0754 /* mac-render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA942A50059B0F9000D7D022 /* mac-render.cpp */; };
@ -360,7 +360,7 @@
CF0567360CF98E7E00C7877C /* winout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5F207609F76001BAB8B /* winout.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; };
CF0567380CF98E7E00C7877C /* mac-appleevent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EACDDBB004D6A89700A80003 /* mac-appleevent.cpp */; };
CF0567390CF98E7E00C7877C /* mac-audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EADE6347052E5C4300A80003 /* mac-audio.cpp */; };
CF05673B0CF98E7E00C7877C /* mac-cart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.cpp */; };
CF05673B0CF98E7E00C7877C /* mac-cart.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.mm */; };
CF05673C0CF98E7E00C7877C /* mac-cheat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67204AC7FCE00A80003 /* mac-cheat.cpp */; };
CF05673D0CF98E7E00C7877C /* mac-cheatfinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67404AC7FCE00A80003 /* mac-cheatfinder.cpp */; };
CF05673E0CF98E7E00C7877C /* mac-client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA16051C0639E4C0004412AB /* mac-client.cpp */; };
@ -375,7 +375,7 @@
CF0567490CF98E7E00C7877C /* mac-multicart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA26BBD50B3676E800A570B5 /* mac-multicart.cpp */; };
CF05674A0CF98E7E00C7877C /* mac-musicbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67F04AC7FCE00A80003 /* mac-musicbox.cpp */; };
CF05674B0CF98E7E00C7877C /* mac-netplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA1605500639E735004412AB /* mac-netplay.cpp */; };
CF05674C0CF98E7E00C7877C /* mac-os.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.cpp */; };
CF05674C0CF98E7E00C7877C /* mac-os.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.mm */; };
CF05674D0CF98E7E00C7877C /* mac-prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96B04D584B700A80003 /* mac-prefs.cpp */; };
CF05674E0CF98E7E00C7877C /* mac-quicktime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7F18506CB3D6F00C2D767 /* mac-quicktime.cpp */; };
CF05674F0CF98E7E00C7877C /* mac-render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA942A50059B0F9000D7D022 /* mac-render.cpp */; };
@ -565,7 +565,7 @@
CF2F46C31095EE72007D33FA /* winout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7B5F207609F76001BAB8B /* winout.cpp */; settings = {COMPILER_FLAGS = "-fexceptions"; }; };
CF2F46C41095EE72007D33FA /* mac-appleevent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EACDDBB004D6A89700A80003 /* mac-appleevent.cpp */; };
CF2F46C51095EE72007D33FA /* mac-audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EADE6347052E5C4300A80003 /* mac-audio.cpp */; };
CF2F46C61095EE72007D33FA /* mac-cart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.cpp */; };
CF2F46C61095EE72007D33FA /* mac-cart.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67004AC7FCE00A80003 /* mac-cart.mm */; };
CF2F46C71095EE72007D33FA /* mac-cheat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67204AC7FCE00A80003 /* mac-cheat.cpp */; };
CF2F46C81095EE72007D33FA /* mac-cheatfinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67404AC7FCE00A80003 /* mac-cheatfinder.cpp */; };
CF2F46C91095EE72007D33FA /* mac-client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA16051C0639E4C0004412AB /* mac-client.cpp */; };
@ -580,7 +580,7 @@
CF2F46D21095EE72007D33FA /* mac-multicart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA26BBD50B3676E800A570B5 /* mac-multicart.cpp */; };
CF2F46D31095EE72007D33FA /* mac-musicbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAECB67F04AC7FCE00A80003 /* mac-musicbox.cpp */; };
CF2F46D41095EE72007D33FA /* mac-netplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA1605500639E735004412AB /* mac-netplay.cpp */; };
CF2F46D51095EE72007D33FA /* mac-os.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.cpp */; };
CF2F46D51095EE72007D33FA /* mac-os.mm in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96604D582B700A80003 /* mac-os.mm */; };
CF2F46D61095EE72007D33FA /* mac-prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0E96B04D584B700A80003 /* mac-prefs.cpp */; };
CF2F46D71095EE72007D33FA /* mac-quicktime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAA7F18506CB3D6F00C2D767 /* mac-quicktime.cpp */; };
CF2F46D81095EE72007D33FA /* mac-render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA942A50059B0F9000D7D022 /* mac-render.cpp */; };
@ -669,6 +669,12 @@
CFA518D90EBCB4CA008379F6 /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518D60EBCB4CA008379F6 /* ioapi.h */; };
CFA518DD0EBCB4D2008379F6 /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518DA0EBCB4D2008379F6 /* unzip.h */; };
CFA518E80EBCB5B1008379F6 /* crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = CFA518E50EBCB5B1008379F6 /* crypt.h */; };
CFAEC7DE1113149B00E0A846 /* hermite_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DC1113149B00E0A846 /* hermite_resampler.h */; };
CFAEC7DF1113149B00E0A846 /* linear_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DD1113149B00E0A846 /* linear_resampler.h */; };
CFAEC7E01113149B00E0A846 /* hermite_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DC1113149B00E0A846 /* hermite_resampler.h */; };
CFAEC7E11113149B00E0A846 /* linear_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DD1113149B00E0A846 /* linear_resampler.h */; };
CFAEC7E21113149B00E0A846 /* hermite_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DC1113149B00E0A846 /* hermite_resampler.h */; };
CFAEC7E31113149B00E0A846 /* linear_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = CFAEC7DD1113149B00E0A846 /* linear_resampler.h */; };
CFE7FBB10D2F6755002F3102 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE061710526CCB900A80003 /* debug.cpp */; };
CFE7FBB40D2F67BA002F3102 /* fxemu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAE0617C0526CCB900A80003 /* fxemu.cpp */; };
CFE7FBB80D2F683C002F3102 /* debug.h in Headers */ = {isa = PBXBuildFile; fileRef = EA6E6C0E08F9734500CB3555 /* debug.h */; };
@ -737,6 +743,8 @@
CFA518E50EBCB5B1008379F6 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = "<group>"; };
CFA82C3D0F1B43A60089C17F /* srtcemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = srtcemu.h; sourceTree = "<group>"; };
CFA82C3E0F1B43A60089C17F /* srtcemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = srtcemu.cpp; sourceTree = "<group>"; };
CFAEC7DC1113149B00E0A846 /* hermite_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hermite_resampler.h; sourceTree = "<group>"; };
CFAEC7DD1113149B00E0A846 /* linear_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linear_resampler.h; sourceTree = "<group>"; };
CFEFAE8A10EAC92300FB081A /* snes_ntsc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snes_ntsc.c; sourceTree = "<group>"; };
CFEFAE8E10EAC92B00FB081A /* snes_ntsc_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snes_ntsc_config.h; sourceTree = "<group>"; };
CFEFAE8F10EAC92B00FB081A /* snes_ntsc_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snes_ntsc_impl.h; sourceTree = "<group>"; };
@ -897,10 +905,10 @@
EAE061EA0526CCB900A80003 /* srtc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = srtc.h; sourceTree = "<group>"; };
EAE061EB0526CCB900A80003 /* tile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = tile.cpp; sourceTree = "<group>"; };
EAE061EC0526CCB900A80003 /* tile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = tile.h; sourceTree = "<group>"; };
EAE0E96604D582B700A80003 /* mac-os.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "mac-os.cpp"; sourceTree = "<group>"; };
EAE0E96604D582B700A80003 /* mac-os.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = "mac-os.mm"; sourceTree = "<group>"; };
EAE0E96B04D584B700A80003 /* mac-prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "mac-prefs.cpp"; sourceTree = "<group>"; };
EAECB66D04AC7FCD00A80003 /* mac-appleevent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "mac-appleevent.h"; sourceTree = "<group>"; };
EAECB67004AC7FCE00A80003 /* mac-cart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "mac-cart.cpp"; sourceTree = "<group>"; };
EAECB67004AC7FCE00A80003 /* mac-cart.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = "mac-cart.mm"; sourceTree = "<group>"; };
EAECB67104AC7FCE00A80003 /* mac-cart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "mac-cart.h"; sourceTree = "<group>"; };
EAECB67204AC7FCE00A80003 /* mac-cheat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = "mac-cheat.cpp"; sourceTree = "<group>"; };
EAECB67304AC7FCE00A80003 /* mac-cheat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "mac-cheat.h"; sourceTree = "<group>"; };
@ -1044,6 +1052,8 @@
CF37574F10A6AEA1001BF7C5 /* blargg_config.h */,
CF37575010A6AEA1001BF7C5 /* blargg_endian.h */,
CF37575110A6AEA1001BF7C5 /* blargg_source.h */,
CFAEC7DC1113149B00E0A846 /* hermite_resampler.h */,
CFAEC7DD1113149B00E0A846 /* linear_resampler.h */,
CF37575310A6AEA1001BF7C5 /* resampler.h */,
CF37575410A6AEA1001BF7C5 /* ring_buffer.h */,
CF37575610A6AEA1001BF7C5 /* SNES_SPC.h */,
@ -1259,7 +1269,7 @@
EA362C3E086119D100FBE476 /* HID_Utilities_External.h */,
EACDDBB004D6A89700A80003 /* mac-appleevent.cpp */,
EADE6347052E5C4300A80003 /* mac-audio.cpp */,
EAECB67004AC7FCE00A80003 /* mac-cart.cpp */,
EAECB67004AC7FCE00A80003 /* mac-cart.mm */,
EAECB67204AC7FCE00A80003 /* mac-cheat.cpp */,
EAECB67404AC7FCE00A80003 /* mac-cheatfinder.cpp */,
EA16051C0639E4C0004412AB /* mac-client.cpp */,
@ -1274,7 +1284,7 @@
EA26BBD50B3676E800A570B5 /* mac-multicart.cpp */,
EAECB67F04AC7FCE00A80003 /* mac-musicbox.cpp */,
EA1605500639E735004412AB /* mac-netplay.cpp */,
EAE0E96604D582B700A80003 /* mac-os.cpp */,
EAE0E96604D582B700A80003 /* mac-os.mm */,
EAE0E96B04D584B700A80003 /* mac-prefs.cpp */,
EAA7F18506CB3D6F00C2D767 /* mac-quicktime.cpp */,
EA942A50059B0F9000D7D022 /* mac-render.cpp */,
@ -1423,6 +1433,8 @@
CF047D97109D0E0600FD0754 /* mac-prefix.h in Headers */,
CF047D98109D0E0600FD0754 /* mac-global_prefix.h in Headers */,
CF047D99109D0E0600FD0754 /* HID_Utilities_External.h in Headers */,
CFAEC7E01113149B00E0A846 /* hermite_resampler.h in Headers */,
CFAEC7E11113149B00E0A846 /* linear_resampler.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1538,6 +1550,8 @@
CF0566EC0CF98E7E00C7877C /* mac-prefix.h in Headers */,
CF0566ED0CF98E7E00C7877C /* mac-global_prefix.h in Headers */,
CF0566EE0CF98E7E00C7877C /* HID_Utilities_External.h in Headers */,
CFAEC7DE1113149B00E0A846 /* hermite_resampler.h in Headers */,
CFAEC7DF1113149B00E0A846 /* linear_resampler.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1653,6 +1667,8 @@
CF2F46711095EE72007D33FA /* mac-prefix.h in Headers */,
CF2F46721095EE72007D33FA /* mac-global_prefix.h in Headers */,
CF2F46731095EE72007D33FA /* HID_Utilities_External.h in Headers */,
CFAEC7E21113149B00E0A846 /* hermite_resampler.h in Headers */,
CFAEC7E31113149B00E0A846 /* linear_resampler.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1721,9 +1737,16 @@
/* Begin PBXProject section */
20286C28FDCF999611CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = EA6A1100085808D200A1CF18 /* Build configuration list for PBXProject "snes9x" */;
buildConfigurationList = EA6A1100085808D200A1CF18 /* Build configuration list for PBXProject "macpdate" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 20286C29FDCF999611CA2CEA /* Snes9x CVS */;
projectDirPath = "";
projectRoot = ..;
@ -1904,7 +1927,7 @@
CF047DE9109D0E0600FD0754 /* winout.cpp in Sources */,
CF047DEA109D0E0600FD0754 /* mac-appleevent.cpp in Sources */,
CF047DEB109D0E0600FD0754 /* mac-audio.cpp in Sources */,
CF047DEC109D0E0600FD0754 /* mac-cart.cpp in Sources */,
CF047DEC109D0E0600FD0754 /* mac-cart.mm in Sources */,
CF047DED109D0E0600FD0754 /* mac-cheat.cpp in Sources */,
CF047DEE109D0E0600FD0754 /* mac-cheatfinder.cpp in Sources */,
CF047DEF109D0E0600FD0754 /* mac-client.cpp in Sources */,
@ -1919,7 +1942,7 @@
CF047DF8109D0E0600FD0754 /* mac-multicart.cpp in Sources */,
CF047DF9109D0E0600FD0754 /* mac-musicbox.cpp in Sources */,
CF047DFA109D0E0600FD0754 /* mac-netplay.cpp in Sources */,
CF047DFB109D0E0600FD0754 /* mac-os.cpp in Sources */,
CF047DFB109D0E0600FD0754 /* mac-os.mm in Sources */,
CF047DFC109D0E0600FD0754 /* mac-prefs.cpp in Sources */,
CF047DFD109D0E0600FD0754 /* mac-quicktime.cpp in Sources */,
CF047DFE109D0E0600FD0754 /* mac-render.cpp in Sources */,
@ -1999,7 +2022,7 @@
CF0567360CF98E7E00C7877C /* winout.cpp in Sources */,
CF0567380CF98E7E00C7877C /* mac-appleevent.cpp in Sources */,
CF0567390CF98E7E00C7877C /* mac-audio.cpp in Sources */,
CF05673B0CF98E7E00C7877C /* mac-cart.cpp in Sources */,
CF05673B0CF98E7E00C7877C /* mac-cart.mm in Sources */,
CF05673C0CF98E7E00C7877C /* mac-cheat.cpp in Sources */,
CF05673D0CF98E7E00C7877C /* mac-cheatfinder.cpp in Sources */,
CF05673E0CF98E7E00C7877C /* mac-client.cpp in Sources */,
@ -2014,7 +2037,7 @@
CF0567490CF98E7E00C7877C /* mac-multicart.cpp in Sources */,
CF05674A0CF98E7E00C7877C /* mac-musicbox.cpp in Sources */,
CF05674B0CF98E7E00C7877C /* mac-netplay.cpp in Sources */,
CF05674C0CF98E7E00C7877C /* mac-os.cpp in Sources */,
CF05674C0CF98E7E00C7877C /* mac-os.mm in Sources */,
CF05674D0CF98E7E00C7877C /* mac-prefs.cpp in Sources */,
CF05674E0CF98E7E00C7877C /* mac-quicktime.cpp in Sources */,
CF05674F0CF98E7E00C7877C /* mac-render.cpp in Sources */,
@ -2094,7 +2117,7 @@
CF2F46C31095EE72007D33FA /* winout.cpp in Sources */,
CF2F46C41095EE72007D33FA /* mac-appleevent.cpp in Sources */,
CF2F46C51095EE72007D33FA /* mac-audio.cpp in Sources */,
CF2F46C61095EE72007D33FA /* mac-cart.cpp in Sources */,
CF2F46C61095EE72007D33FA /* mac-cart.mm in Sources */,
CF2F46C71095EE72007D33FA /* mac-cheat.cpp in Sources */,
CF2F46C81095EE72007D33FA /* mac-cheatfinder.cpp in Sources */,
CF2F46C91095EE72007D33FA /* mac-client.cpp in Sources */,
@ -2109,7 +2132,7 @@
CF2F46D21095EE72007D33FA /* mac-multicart.cpp in Sources */,
CF2F46D31095EE72007D33FA /* mac-musicbox.cpp in Sources */,
CF2F46D41095EE72007D33FA /* mac-netplay.cpp in Sources */,
CF2F46D51095EE72007D33FA /* mac-os.cpp in Sources */,
CF2F46D51095EE72007D33FA /* mac-os.mm in Sources */,
CF2F46D61095EE72007D33FA /* mac-prefs.cpp in Sources */,
CF2F46D71095EE72007D33FA /* mac-quicktime.cpp in Sources */,
CF2F46D81095EE72007D33FA /* mac-render.cpp in Sources */,
@ -2475,7 +2498,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EA6A1100085808D200A1CF18 /* Build configuration list for PBXProject "snes9x" */ = {
EA6A1100085808D200A1CF18 /* Build configuration list for PBXProject "macpdate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EA6A1102085808D200A1CF18 /* Release */,