Cocoa Port: compile fixes, several code cleanups, and removed requirement for hardware accelerated opengl renderers. updated email for mac port related questions

This commit is contained in:
gecko_reverse 2008-09-02 03:37:46 +00:00
parent 421ad80ab2
commit 53bb6b334d
9 changed files with 30 additions and 32 deletions

View File

@ -19,6 +19,7 @@
- Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio GorgŽ). [Jeff]
- Default key mappings are no longer case sensitive. [Jeff]
- Added ability to limit speed. [Jeff]
- Fixed: Video output should work on software-only 3D renderers. [Jeff]
Windows port:
- Removed the bug report link with a define, to avoid reports from betas/external builds [shash]
- Added the version on window bar to recognize versions from screenshots [shash]

View File

@ -76,7 +76,7 @@ General inquiries should go to:
E-mail: guillaume.duhamel@gmail.com
Mac OS X Port-related inquiries should go to:
E-mail: reversegecko@gmail.com
E-mail: osx@desmume.org
Web: http://desmume.sourceforge.net

View File

@ -23,6 +23,7 @@
#include <stdlib.h>
#include "NDSSystem.h"
#include "render3D.h"
#include "MMU.h"
#include "cflash.h"
@ -181,7 +182,7 @@ void NDS_DeInit(void) {
SPU_DeInit();
Screen_DeInit();
MMU_DeInit();
NDS_3D_Close();
gpu3D->NDS_3D_Close();
}
BOOL NDS_SetROM(u8 * rom, u32 mask)
@ -534,7 +535,7 @@ void NDS_Reset( void)
GPU_Reset(MainScreen.gpu, 0);
GPU_Reset(SubScreen.gpu, 1);
NDS_3D_Reset();
gpu3D->NDS_3D_Reset();
SPU_Reset();
execute = oldexecute;

View File

@ -70,6 +70,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA]]>
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-O3" />
<Add option="-fpascal-strings -fasm-blocks" />
<Add option="-DDESMUME_COCOA" />
<Add option="-DHAVE_LIBZ" />
<Add directory="dialogs" />

View File

@ -162,8 +162,7 @@
080E96DDFE201D6D7F000001 /* Cocoa Port */ = {
isa = PBXGroup;
children = (
723395580E596E9100999693 /* speed_limit_selection_window.h */,
723395590E596E9100999693 /* speed_limit_selection_window.m */,
72D219C40E6B4DDF00439B28 /* Dialogs */,
7277B8EA0D9F25F700D283BD /* about.m */,
729BEC5C0D9D55DB00ED561B /* globals.h */,
729BEC600D9D55DB00ED561B /* main.m */,
@ -311,6 +310,15 @@
name = Frameworks;
sourceTree = "<group>";
};
72D219C40E6B4DDF00439B28 /* Dialogs */ = {
isa = PBXGroup;
children = (
723395580E596E9100999693 /* speed_limit_selection_window.h */,
723395590E596E9100999693 /* speed_limit_selection_window.m */,
);
name = Dialogs;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -497,8 +505,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
GCC_PREPROCESSOR_DEFINITIONS = (
HAVE_LIBZ,
DESMUME_COCOA,
@ -506,6 +513,7 @@
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)";
OTHER_LDFLAGS = "-lz";
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;

View File

@ -19,8 +19,9 @@
/*
This file is part of the Cocoa (Mac OS X) port of DeSmuME emulator
By Jeff Bland (reversegecko@gmail.com)
By Jeff Bland
Based on work by yopyop and the DeSmuME team!
Mac related questions can go to osx@desmume.org
*/
#import "main_window.h"

View File

@ -1248,20 +1248,8 @@ NSMenuItem *screenshot_to_file_item = nil;
[pause_item setState:NSOffState];
}
for(i = 0; i < MAX_FRAME_SKIP; i++)
{
[frame_skip_item[i] setTarget:self];
if([self frameSkip] == i)
[frame_skip_item[i] setState:NSOnState];
else
[frame_skip_item[i] setState:NSOffState];
}
[frame_skip_auto_item setTarget:self];
if([self frameSkip] < 0)
[frame_skip_auto_item setState:NSOnState];
else
[frame_skip_auto_item setState:NSOffState];
for(i = 0; i < MAX_FRAME_SKIP; i++)[frame_skip_item[i] setTarget:self];
[self setFrameSkip:[self frameSkip]]; //set the menu checkmarks correctly
[speed_limit_25_item setTarget:self];
[speed_limit_50_item setTarget:self];
@ -1397,13 +1385,13 @@ NSMenuItem *screenshot_to_file_item = nil;
- (BOOL)validateMenuItem:(NSMenuItem*)item
{
//This function is called automaticlly by Cocoa
//This function is called automatically by Cocoa
//when it needs to know if a menu item should be greyed out
int i;
if([self ROMLoaded] == NO)
{ //if no rom is loaded, various options are disables
{ //if no rom is loaded, various options are disabled
if(item == close_rom_item)return NO;
if(item == rom_info_item)return NO;
if(item == save_state_as_item)return NO;

View File

@ -56,12 +56,9 @@
//Create the pixel format for our video output view
NSOpenGLPixelFormatAttribute attrs[] =
{
NSOpenGLPFAAccelerated,
NSOpenGLPFANoRecovery,
NSOpenGLPFAColorSize, 16,
NSOpenGLPFAAlphaSize, 0,
NSOpenGLPFADepthSize, 0,
NSOpenGLPFAWindow,
//NSOpenGLPFAFullScreen,
NSOpenGLPFAWindow, //need a renderer that can draw to a window
//NSOpenGLPFARendererID, some_number, //this picks a particular renderer, for testing
0
};
@ -70,7 +67,7 @@
{
messageDialog(NSLocalizedString(@"Error", nil), @"Couldn't create OpenGL pixel format for video output");
context = nil;
[super dealloc];
[self release];
return nil;
} else
{
@ -80,7 +77,7 @@
if(context == nil)
{
messageDialog(NSLocalizedString(@"Error", nil), @"Couldn't create OpenGL context for video output");
[super dealloc];
[self release];
return nil;
}
}

View File

@ -42,6 +42,7 @@
#ifdef DESMUME_COCOA
#define __declspec(ignore)
#define printlog(ignore)
#ifdef __BIG_ENDIAN__
#define WORDS_BIGENDIAN
#endif