mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
SDLMAME: improved OS X and SDL 1.3 SVN support, try to autodetect SDLMAME targets [Couriersud]
This commit is contained in:
parent
3997330a94
commit
9ba62e6bce
18
makefile
18
makefile
@ -64,10 +64,24 @@ ifndef TARGETOS
|
||||
ifeq ($(OS),Windows_NT)
|
||||
TARGETOS = win32
|
||||
else
|
||||
|
||||
UNAME = $(shell uname -a)
|
||||
|
||||
ifeq ($(filter Linux,$(UNAME)),Linux)
|
||||
TARGETOS = unix
|
||||
endif
|
||||
ifeq ($(filter Solaris,$(UNAME)),Solaris)
|
||||
TARGETOS = solaris
|
||||
endif
|
||||
ifeq ($(filter FreeBSD,$(UNAME)),FreeBSD)
|
||||
TARGETOS = freebsd
|
||||
endif
|
||||
ifeq ($(filter Darwin,$(UNAME)),Darwin)
|
||||
TARGETOS = macosx
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -608,5 +622,7 @@ $(OBJ)/%.a:
|
||||
ifeq ($(TARGETOS),macosx)
|
||||
$(OBJ)/%.o: $(SRC)/%.m | $(OSPREBUILD)
|
||||
@echo Objective-C compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
|
||||
#$(CC) -x objective-c++ $(CDEFS) $(CCOMFLAGS) $(CONLYFLAGS) -c $< -o $@
|
||||
$(CC) -x objective-c++ $(CDEFS) $(CCOMFLAGS) -c $< -o $@
|
||||
#$(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
|
||||
endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define SDL_USE_NIB_FILE 0
|
||||
|
||||
/* Use this flag to determine whether we use CPS (docking) or not */
|
||||
#define SDL_USE_CPS 1
|
||||
#define SDL_USE_CPS 0
|
||||
#ifdef SDL_USE_CPS
|
||||
/* Portions of CPS.h */
|
||||
typedef struct CPSProcessSerNum
|
||||
@ -30,9 +30,9 @@ typedef struct CPSProcessSerNum
|
||||
UInt32 hi;
|
||||
} CPSProcessSerNum;
|
||||
|
||||
extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||
extern "C" OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||
extern "C" OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||
extern "C" OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
@ -319,7 +319,7 @@ static void CustomApplicationMain (int argc, char **argv)
|
||||
NSString *result;
|
||||
|
||||
bufferSize = selfLen + aStringLen - aRange.length;
|
||||
buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar));
|
||||
buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
|
||||
|
||||
/* Get first part into buffer */
|
||||
localRange.location = 0;
|
||||
|
@ -25,7 +25,7 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
// MAME headers
|
||||
#include "driver.h"
|
||||
#include "emu.h"
|
||||
#include "debug/debugvw.h"
|
||||
#include "debug/debugcon.h"
|
||||
#include "debug/debugcpu.h"
|
||||
@ -1147,7 +1147,7 @@ void console_create_window(running_machine *machine)
|
||||
|
||||
|
||||
- (IBAction)showRightColumn:(id)sender {
|
||||
disasm_view_set_right_column(view, [sender tag]);
|
||||
disasm_view_set_right_column(view, (disasm_right_column) [sender tag]);
|
||||
}
|
||||
|
||||
|
||||
@ -1555,7 +1555,7 @@ void console_create_window(running_machine *machine)
|
||||
|
||||
|
||||
- (void)showDebugger:(NSNotification *)notification {
|
||||
const device_config *device = [[[notification userInfo] objectForKey:@"MAMEDebugDevice"] pointerValue];
|
||||
const device_config *device = (const device_config *) [[[notification userInfo] objectForKey:@"MAMEDebugDevice"] pointerValue];
|
||||
if (device->machine == machine) {
|
||||
if (![window isVisible] && ![window isMiniaturized])
|
||||
[window orderFront:self];
|
||||
@ -1801,7 +1801,7 @@ void console_create_window(running_machine *machine)
|
||||
|
||||
|
||||
- (void)showDebugger:(NSNotification *)notification {
|
||||
const device_config *device = [[[notification userInfo] objectForKey:@"MAMEDebugDevice"] pointerValue];
|
||||
const device_config *device = (const device_config * )[[[notification userInfo] objectForKey:@"MAMEDebugDevice"] pointerValue];
|
||||
if (device->machine == machine) {
|
||||
[self setCPU:device];
|
||||
[window makeKeyAndOrderFront:self];
|
||||
|
@ -714,7 +714,7 @@ static int draw13_window_draw(sdl_window_info *window, UINT32 dc, int update)
|
||||
/* SDL Underlays need alpha = 0 ! */
|
||||
SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
|
||||
SDL_SetRenderDrawColor(0,0,0,0 /*255*/);
|
||||
SDL_RenderFill(NULL);
|
||||
SDL_RenderFillRect(NULL);
|
||||
sdl->blittimer--;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ static int draw13_window_draw(sdl_window_info *window, UINT32 dc, int update)
|
||||
|
||||
SDL_SetRenderDrawBlendMode(map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
|
||||
SDL_SetRenderDrawColor(sr, sg, sb, sa);
|
||||
SDL_RenderLine(prim->bounds.x0 + hofs, prim->bounds.y0 + vofs,
|
||||
SDL_RenderDrawLine(prim->bounds.x0 + hofs, prim->bounds.y0 + vofs,
|
||||
prim->bounds.x1 + hofs, prim->bounds.y1 + vofs);
|
||||
break;
|
||||
case RENDER_PRIMITIVE_QUAD:
|
||||
|
@ -724,7 +724,7 @@ static int drawsdl_window_draw(sdl_window_info *window, UINT32 dc, int update)
|
||||
{
|
||||
/* SDL Underlays need alpha = 0 ! */
|
||||
SDL_SetRenderDrawColor(0,0,0,0);
|
||||
SDL_RenderFill(NULL);
|
||||
SDL_RenderFillRect(NULL);
|
||||
//SDL_RenderFill(0,0,0,0 /*255*/,NULL);
|
||||
sdl->blittimer--;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETOS),macosx)
|
||||
DEFS += -DSDLMAME_UNIX -DSDLMAME_MACOSX
|
||||
DEFS += -DSDLMAME_UNIX -DSDLMAME_MACOSX
|
||||
SYNC_IMPLEMENTATION = ntc
|
||||
MAINLDFLAGS = -Xlinker -all_load
|
||||
ifdef BIGENDIAN
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <mach/mach_time.h>
|
||||
|
||||
// MAME headers
|
||||
#include "osdepend.h"
|
||||
//#include "osdepend.h"
|
||||
#include "osdcore.h"
|
||||
|
||||
//============================================================
|
||||
@ -207,3 +207,29 @@ void osd_break_into_debugger(const char *message)
|
||||
#endif
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// osd_malloc
|
||||
//============================================================
|
||||
|
||||
void *osd_malloc(size_t size)
|
||||
{
|
||||
#ifndef MALLOC_DEBUG
|
||||
return malloc(size);
|
||||
#else
|
||||
#error "MALLOC_DEBUG not yet supported"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//============================================================
|
||||
// osd_free
|
||||
//============================================================
|
||||
|
||||
void osd_free(void *ptr)
|
||||
{
|
||||
#ifndef MALLOC_DEBUG
|
||||
free(ptr);
|
||||
#else
|
||||
#error "MALLOC_DEBUG not yet supported"
|
||||
#endif
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAME_MACOSX
|
||||
#undef Status
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user