More consistent file names.

This commit is contained in:
Steve Checkoway
2008-04-29 05:48:50 +00:00
parent 6003843f0c
commit 6e44065a33
14 changed files with 110 additions and 110 deletions
@@ -1,5 +1,5 @@
#include "global.h"
#include "ArchHooks_darwin.h"
#include "ArchHooks_MacOSX.h"
#include "RageLog.h"
#include "RageUtil.h"
#include "archutils/Unix/CrashHandler.h"
@@ -58,7 +58,7 @@ static bool DoEmergencyShutdown( int signal, siginfo_t *si, const ucontext_t *us
return false;
}
void ArchHooks_darwin::Init()
void ArchHooks_MacOSX::Init()
{
/* First, handle non-fatal termination signals. */
SignalHandler::OnClose( DoCleanShutdown );
@@ -125,7 +125,7 @@ void ArchHooks_darwin::Init()
CFRelease( path );
}
RString ArchHooks_darwin::GetArchName() const
RString ArchHooks_MacOSX::GetArchName() const
{
#if defined(__ppc__)
return "Mac OS X (ppc)";
@@ -137,7 +137,7 @@ RString ArchHooks_darwin::GetArchName() const
}
RString ArchHooks_darwin::GetMachineId() const
RString ArchHooks_MacOSX::GetMachineId() const
{
RString ret;
CFMutableDictionaryRef dict = IOServiceMatching( "IOPlatformExpertDevice" );
@@ -216,7 +216,7 @@ RString ArchHooks_darwin::GetMachineId() const
return ret;
}
void ArchHooks_darwin::DumpDebugInfo()
void ArchHooks_MacOSX::DumpDebugInfo()
{
/* Get system version */
@@ -350,7 +350,7 @@ RString ArchHooks::GetPreferredLanguage()
return ret;
}
bool ArchHooks_darwin::GoToURL( RString sUrl )
bool ArchHooks_MacOSX::GoToURL( RString sUrl )
{
CFURLRef url = CFURLCreateWithBytes( kCFAllocatorDefault, (const UInt8*)sUrl.data(),
sUrl.length(), kCFStringEncodingUTF8, NULL );
@@ -1,9 +1,9 @@
#ifndef ARCH_HOOKS_DARWIN_H
#define ARCH_HOOKS_DARWIN_H
#ifndef ARCH_HOOKS_MACOSX_H
#define ARCH_HOOKS_MACOSX_H
#include "ArchHooks.h"
class ArchHooks_darwin : public ArchHooks
class ArchHooks_MacOSX : public ArchHooks
{
public:
void Init();
@@ -17,9 +17,9 @@ public:
#ifdef ARCH_HOOKS
#error "More than one ArchHooks selected!"
#endif
#define ARCH_HOOKS ArchHooks_darwin
#define ARCH_HOOKS ArchHooks_MacOSX
#endif /* ARCH_HOOKS_DARWIN_H */
#endif /* ARCH_HOOKS_MACOSX_H */
/*
* (c) 2003-2005 Steve Checkoway
@@ -1,12 +1,12 @@
#include "global.h"
#include "RageUtil.h"
#include "DialogDriver_Cocoa.h"
#include "DialogDriver_MacOSX.h"
#include "RageThreads.h"
#include "ProductInfo.h"
#include "InputFilter.h"
#include <Carbon/Carbon.h>
REGISTER_DIALOG_DRIVER_CLASS( Cocoa );
REGISTER_DIALOG_DRIVER_CLASS( MacOSX );
static CFOptionFlags ShowAlert( CFOptionFlags flags, const RString& sMessage, CFStringRef OK,
CFStringRef alt = NULL, CFStringRef other = NULL)
@@ -31,7 +31,7 @@ static CFOptionFlags ShowAlert( CFOptionFlags flags, const RString& sMessage, CF
#define LSTRING(b,x) CFBundleCopyLocalizedString( (b), CFSTR(x), NULL, CFSTR("Localizable") )
void DialogDriver_Cocoa::OK( RString sMessage, RString sID )
void DialogDriver_MacOSX::OK( RString sMessage, RString sID )
{
CFBundleRef bundle = CFBundleGetMainBundle();
CFStringRef sDSA = LSTRING( bundle, "Don't show again" );
@@ -42,12 +42,12 @@ void DialogDriver_Cocoa::OK( RString sMessage, RString sID )
Dialog::IgnoreMessage( sID );
}
void DialogDriver_Cocoa::Error( RString sError, RString sID )
void DialogDriver_MacOSX::Error( RString sError, RString sID )
{
ShowAlert( kCFUserNotificationStopAlertLevel, sError, CFSTR("OK") );
}
Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( RString sMessage, RString sID )
Dialog::Result DialogDriver_MacOSX::AbortRetryIgnore( RString sMessage, RString sID )
{
CFBundleRef bundle = CFBundleGetMainBundle();
CFStringRef sIgnore = LSTRING( bundle, "Ignore" );
@@ -73,7 +73,7 @@ Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( RString sMessage, RString s
}
}
Dialog::Result DialogDriver_Cocoa::AbortRetry( RString sMessage, RString sID )
Dialog::Result DialogDriver_MacOSX::AbortRetry( RString sMessage, RString sID )
{
CFBundleRef bundle = CFBundleGetMainBundle();
CFStringRef sRetry = LSTRING( bundle, "Retry" );
@@ -1,9 +1,9 @@
#ifndef DIALOG_BOX_DRIVER_COCOA_H
#define DIALOG_BOX_DRIVER_COCOA_H
#ifndef DIALOG_BOX_DRIVER_MACOSX_H
#define DIALOG_BOX_DRIVER_MACOSX_H
#include "DialogDriver.h"
class DialogDriver_Cocoa: public DialogDriver
class DialogDriver_MacOSX: public DialogDriver
{
public:
void Error( RString sError, RString sID );
@@ -1,6 +1,6 @@
#include "global.h"
#include "RageLog.h"
#include "InputHandler_Carbon.h"
#include "InputHandler_MacOSX_HID.h"
#include "Foreach.h"
#include "PrefsManager.h"
#include "InputFilter.h"
@@ -12,15 +12,15 @@
#include <IOKit/IOMessage.h>
#include <Carbon/Carbon.h>
REGISTER_INPUT_HANDLER_CLASS( Carbon );
REGISTER_INPUT_HANDLER_CLASS2( HID, MacOSX_HID );
void InputHandler_Carbon::QueueCallBack( void *target, int result, void *refcon, void *sender )
void InputHandler_MacOSX_HID::QueueCallBack( void *target, int result, void *refcon, void *sender )
{
// The result seems useless as you can't actually return anything...
// refcon is the Device number
RageTimer now;
InputHandler_Carbon *This = (InputHandler_Carbon *)target;
InputHandler_MacOSX_HID *This = (InputHandler_MacOSX_HID *)target;
IOHIDQueueInterface **queue = (IOHIDQueueInterface **)sender;
IOHIDEventStruct event;
AbsoluteTime zeroTime = { 0, 0 };
@@ -40,9 +40,9 @@ static void RunLoopStarted( CFRunLoopObserverRef o, CFRunLoopActivity a, void *s
((RageSemaphore *)sem)->Post();
}
int InputHandler_Carbon::Run( void *data )
int InputHandler_MacOSX_HID::Run( void *data )
{
InputHandler_Carbon *This = (InputHandler_Carbon *)data;
InputHandler_MacOSX_HID *This = (InputHandler_MacOSX_HID *)data;
This->m_LoopRef = CFRunLoopGetCurrent();
CFRetain( This->m_LoopRef );
@@ -64,7 +64,7 @@ int InputHandler_Carbon::Run( void *data )
}
/* Add a source for ending the run loop. This serves two purposes:
* 1. it provides a way to terminate the run loop when IH_Carbon exists, and
* 1. it provides a way to terminate the run loop when IH_MacOSX_HID exists, and
* 2. it ensures that CFRunLoopRun() doesn't return immediately if there are no other sources. */
{
/* Being a little tricky here, the perform callback takes a void* and returns nothing.
@@ -84,19 +84,19 @@ int InputHandler_Carbon::Run( void *data )
return 0;
}
void InputHandler_Carbon::DeviceAdded( void *refCon, io_iterator_t )
void InputHandler_MacOSX_HID::DeviceAdded( void *refCon, io_iterator_t )
{
InputHandler_Carbon *This = (InputHandler_Carbon *)refCon;
InputHandler_MacOSX_HID *This = (InputHandler_MacOSX_HID *)refCon;
LockMut( This->m_ChangeLock );
This->m_bChanged = true;
}
void InputHandler_Carbon::DeviceChanged( void *refCon, io_service_t service, natural_t messageType, void *arg )
void InputHandler_MacOSX_HID::DeviceChanged( void *refCon, io_service_t service, natural_t messageType, void *arg )
{
if( messageType == kIOMessageServiceIsTerminated )
{
InputHandler_Carbon *This = (InputHandler_Carbon *)refCon;
InputHandler_MacOSX_HID *This = (InputHandler_MacOSX_HID *)refCon;
LockMut( This->m_ChangeLock );
This->m_bChanged = true;
@@ -104,20 +104,20 @@ void InputHandler_Carbon::DeviceChanged( void *refCon, io_service_t service, nat
}
// m_LoopRef needs to be set before this is called
void InputHandler_Carbon::StartDevices()
void InputHandler_MacOSX_HID::StartDevices()
{
int n = 0;
ASSERT( m_LoopRef );
FOREACH( HIDDevice *, m_vDevices, i )
(*i)->StartQueue( m_LoopRef, InputHandler_Carbon::QueueCallBack, this, n++ );
(*i)->StartQueue( m_LoopRef, InputHandler_MacOSX_HID::QueueCallBack, this, n++ );
CFRunLoopSourceRef runLoopSource = IONotificationPortGetRunLoopSource( m_NotifyPort );
CFRunLoopAddSource( m_LoopRef, runLoopSource, kCFRunLoopDefaultMode );
}
InputHandler_Carbon::~InputHandler_Carbon()
InputHandler_MacOSX_HID::~InputHandler_MacOSX_HID()
{
FOREACH( HIDDevice *, m_vDevices, i )
delete *i;
@@ -169,12 +169,12 @@ static HIDDevice *MakeDevice( InputDevice id )
return NULL;
}
void InputHandler_Carbon::AddDevices( int usagePage, int usage, InputDevice &id )
void InputHandler_MacOSX_HID::AddDevices( int usagePage, int usage, InputDevice &id )
{
io_iterator_t iter;
CFDictionaryRef dict = GetMatchingDictionary( usagePage, usage );
kern_return_t ret = IOServiceAddMatchingNotification( m_NotifyPort, kIOFirstMatchNotification, dict,
InputHandler_Carbon::DeviceAdded, this, &iter );
InputHandler_MacOSX_HID::DeviceAdded, this, &iter );
io_object_t device;
if( ret != KERN_SUCCESS )
@@ -206,7 +206,7 @@ void InputHandler_Carbon::AddDevices( int usagePage, int usage, InputDevice &id
m_vDevices.push_back( dev );
ret = IOServiceAddInterestNotification( m_NotifyPort, device, kIOGeneralInterest,
InputHandler_Carbon::DeviceChanged, this, &i );
InputHandler_MacOSX_HID::DeviceChanged, this, &i );
if( ret == KERN_SUCCESS )
m_vIters.push_back( i );
@@ -214,7 +214,7 @@ void InputHandler_Carbon::AddDevices( int usagePage, int usage, InputDevice &id
}
}
InputHandler_Carbon::InputHandler_Carbon() : m_Sem( "Input thread started" ), m_ChangeLock( "Input handler change lock" )
InputHandler_MacOSX_HID::InputHandler_MacOSX_HID() : m_Sem( "Input thread started" ), m_ChangeLock( "Input handler change lock" )
{
InputDevice id = DEVICE_KEYBOARD;
@@ -233,7 +233,7 @@ InputHandler_Carbon::InputHandler_Carbon() : m_Sem( "Input thread started" ), m_
if( PREFSMAN->m_bThreadedInput )
{
m_InputThread.SetName( "Input thread" );
m_InputThread.Create( InputHandler_Carbon::Run, this );
m_InputThread.Create( InputHandler_MacOSX_HID::Run, this );
// Wait for the run loop to start before returning.
m_Sem.Wait();
}
@@ -245,13 +245,13 @@ InputHandler_Carbon::InputHandler_Carbon() : m_Sem( "Input thread started" ), m_
}
}
void InputHandler_Carbon::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices )
void InputHandler_MacOSX_HID::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices )
{
FOREACH_CONST( HIDDevice *, m_vDevices, i )
(*i)->GetDevicesAndDescriptions( vDevices );
}
RString InputHandler_Carbon::GetDeviceSpecificInputString( const DeviceInput &di )
RString InputHandler_MacOSX_HID::GetDeviceSpecificInputString( const DeviceInput &di )
{
if( di.device == DEVICE_KEYBOARD )
{
@@ -341,7 +341,7 @@ RString InputHandler_Carbon::GetDeviceSpecificInputString( const DeviceInput &di
return InputHandler::GetDeviceSpecificInputString( di );
}
wchar_t InputHandler_Carbon::DeviceButtonToChar( DeviceButton button, bool bUseCurrentKeyModifiers )
wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool bUseCurrentKeyModifiers )
{
// KeyTranslate maps these keys to a character. They shouldn't be mapped to any character.
switch( button )
@@ -1,5 +1,5 @@
#ifndef JOYSTICK_H
#define JOYSTICK_H
#ifndef INPUT_HANDLER_MACOSX_HID_H
#define INPUT_HANDLER_MACOSX_HID_H
#include <vector>
#include <CoreFoundation/CoreFoundation.h>
@@ -9,7 +9,7 @@
class HIDDevice;
class InputHandler_Carbon : public InputHandler
class InputHandler_MacOSX_HID : public InputHandler
{
private:
vector<HIDDevice *> m_vDevices;
@@ -29,8 +29,8 @@ private:
void AddDevices( int usagePage, int usage, InputDevice &id );
public:
InputHandler_Carbon();
~InputHandler_Carbon();
InputHandler_MacOSX_HID();
~InputHandler_MacOSX_HID();
bool DevicesChanged() { LockMut( m_ChangeLock ); return m_bChanged; }
void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevicesOut );
@@ -12,7 +12,7 @@ LoadingWindow *LoadingWindow::Create()
return new LoadingWindow_Null;
#endif
/* Don't load NULL by default. */
const RString drivers = "xbox,win32,cocoa,gtk";
const RString drivers = "xbox,win32,macosx,gtk";
vector<RString> DriversToTry;
split( drivers, ",", DriversToTry, true );
@@ -25,8 +25,8 @@ LoadingWindow *LoadingWindow::Create()
{
Driver = DriversToTry[i];
#ifdef USE_LOADING_WINDOW_COCOA
if( !DriversToTry[i].CompareNoCase("Cocoa") ) ret = new LoadingWindow_Cocoa;
#ifdef USE_LOADING_WINDOW_MACOSX
if( !DriversToTry[i].CompareNoCase("MacOSX") ) ret = new LoadingWindow_MacOSX;
#endif
#ifdef USE_LOADING_WINDOW_GTK
if( !DriversToTry[i].CompareNoCase("Gtk") ) ret = new LoadingWindow_Gtk;
@@ -1,18 +1,18 @@
/* LoadingWindow_Cocoa - Loading window for OSX */
/* LoadingWindow_MacOSX - Loading window for OSX */
#ifndef LOADING_WINDOW_COCOA_H
#define LOADING_WINDOW_COCOA_H
#ifndef LOADING_WINDOW_MACOSX_H
#define LOADING_WINDOW_MACOSX_H
#include "LoadingWindow.h"
class LoadingWindow_Cocoa : public LoadingWindow
class LoadingWindow_MacOSX : public LoadingWindow
{
public:
LoadingWindow_Cocoa();
~LoadingWindow_Cocoa();
LoadingWindow_MacOSX();
~LoadingWindow_MacOSX();
void SetText( RString str );
};
#define USE_LOADING_WINDOW_COCOA
#define USE_LOADING_WINDOW_MACOSX
#endif
@@ -1,6 +1,6 @@
#import <Cocoa/Cocoa.h>
#import "ProductInfo.h"
#import "LoadingWindow_Cocoa.h"
#import "LoadingWindow_MacOSX.h"
#import "RageUtil.h"
#import "RageFile.h"
@@ -74,7 +74,7 @@
static LoadingWindowHelper *g_Helper = nil;
LoadingWindow_Cocoa::LoadingWindow_Cocoa()
LoadingWindow_MacOSX::LoadingWindow_MacOSX()
{
RageFile f;
RString data;
@@ -104,7 +104,7 @@ LoadingWindow_Cocoa::LoadingWindow_Cocoa()
[image release];
}
LoadingWindow_Cocoa::~LoadingWindow_Cocoa()
LoadingWindow_MacOSX::~LoadingWindow_MacOSX()
{
if( !g_Helper )
return;
@@ -115,7 +115,7 @@ LoadingWindow_Cocoa::~LoadingWindow_Cocoa()
[pool release];
}
void LoadingWindow_Cocoa::SetText( RString str )
void LoadingWindow_MacOSX::SetText( RString str )
{
if( !g_Helper )
return;
@@ -1,5 +1,5 @@
#ifndef LOW_LEVEL_WINDOW_COCOA_H
#define LOW_LEVEL_WINDOW_COCOA_H
#ifndef LOW_LEVEL_WINDOW_MACOSX_H
#define LOW_LEVEL_WINDOW_MACOSX_H
#include "LowLevelWindow.h"
#include "RageDisplay.h"
@@ -7,7 +7,7 @@
typedef struct objc_object *id;
typedef const struct __CFDictionary *CFDictionaryRef;
class LowLevelWindow_Cocoa : public LowLevelWindow
class LowLevelWindow_MacOSX : public LowLevelWindow
{
VideoModeParams m_CurrentParams;
id m_WindowDelegate;
@@ -16,8 +16,8 @@ class LowLevelWindow_Cocoa : public LowLevelWindow
CFDictionaryRef m_CurrentDisplayMode;
public:
LowLevelWindow_Cocoa();
~LowLevelWindow_Cocoa();
LowLevelWindow_MacOSX();
~LowLevelWindow_MacOSX();
void *GetProcAddress( RString s );
RString TryVideoMode( const VideoModeParams& p, bool& newDeviceOut );
void GetDisplayResolutions( DisplayResolutions &dr ) const;
@@ -43,7 +43,7 @@ private:
#ifdef ARCH_LOW_LEVEL_WINDOW
#error "More than one LowLevelWindow selected!"
#endif
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_Cocoa
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_MacOSX
#endif
@@ -1,5 +1,5 @@
#import "global.h"
#import "LowLevelWindow_Cocoa.h"
#import "LowLevelWindow_MacOSX.h"
#import "DisplayResolutions.h"
#import "RageUtil.h"
#import "RageThreads.h"
@@ -177,11 +177,11 @@ static NSOpenGLContext *CreateOGLContext( GLContextType type, int iColorSize, in
}
class RenderTarget_Cocoa : public RenderTarget
class RenderTarget_MacOSX : public RenderTarget
{
public:
RenderTarget_Cocoa( id shareContext );
~RenderTarget_Cocoa();
RenderTarget_MacOSX( id shareContext );
~RenderTarget_MacOSX();
void Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut );
unsigned GetTexture() const { return m_iTexHandle; }
void StartRenderingTo();
@@ -193,7 +193,7 @@ private:
int m_iWidth, m_iHeight;
};
RenderTarget_Cocoa::RenderTarget_Cocoa( id shareContext )
RenderTarget_MacOSX::RenderTarget_MacOSX( id shareContext )
{
m_ShareContext = shareContext;
m_OldContext = nil;
@@ -203,7 +203,7 @@ RenderTarget_Cocoa::RenderTarget_Cocoa( id shareContext )
m_iHeight = 0;
}
RenderTarget_Cocoa::~RenderTarget_Cocoa()
RenderTarget_MacOSX::~RenderTarget_MacOSX()
{
POOL;
[m_PBufferContext release];
@@ -211,7 +211,7 @@ RenderTarget_Cocoa::~RenderTarget_Cocoa()
glDeleteTextures( 1, &m_iTexHandle );
}
void RenderTarget_Cocoa::Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut )
void RenderTarget_MacOSX::Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut )
{
POOL;
m_iWidth = param.iWidth;
@@ -260,7 +260,7 @@ void RenderTarget_Cocoa::Create( const RenderTargetParam &param, int &iTextureWi
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
}
void RenderTarget_Cocoa::StartRenderingTo()
void RenderTarget_MacOSX::StartRenderingTo()
{
DEBUG_ASSERT( !m_OldContext );
m_OldContext = [NSOpenGLContext currentContext];
@@ -268,7 +268,7 @@ void RenderTarget_Cocoa::StartRenderingTo()
glViewport( 0, 0, m_iWidth, m_iHeight );
}
void RenderTarget_Cocoa::FinishRenderingTo()
void RenderTarget_MacOSX::FinishRenderingTo()
{
DEBUG_ASSERT( m_OldContext );
glFlush();
@@ -288,7 +288,7 @@ void RenderTarget_Cocoa::FinishRenderingTo()
m_OldContext = nil;
}
LowLevelWindow_Cocoa::LowLevelWindow_Cocoa() : m_Context(nil), m_BGContext(nil), m_CurrentDisplayMode(NULL)
LowLevelWindow_MacOSX::LowLevelWindow_MacOSX() : m_Context(nil), m_BGContext(nil), m_CurrentDisplayMode(NULL)
{
POOL;
m_WindowDelegate = [[SMWindowDelegate alloc] init];
@@ -299,7 +299,7 @@ LowLevelWindow_Cocoa::LowLevelWindow_Cocoa() : m_Context(nil), m_BGContext(nil),
HOOKS->SetHasFocus( [NSApp isActive] );
}
LowLevelWindow_Cocoa::~LowLevelWindow_Cocoa()
LowLevelWindow_MacOSX::~LowLevelWindow_MacOSX()
{
POOL;
ShutDownFullScreen();
@@ -312,7 +312,7 @@ LowLevelWindow_Cocoa::~LowLevelWindow_Cocoa()
[m_WindowDelegate release];
}
void *LowLevelWindow_Cocoa::GetProcAddress( RString s )
void *LowLevelWindow_MacOSX::GetProcAddress( RString s )
{
// http://developer.apple.com/qa/qa2001/qa1188.html
// Both functions mentioned in there are deprecated in 10.4.
@@ -326,7 +326,7 @@ void *LowLevelWindow_Cocoa::GetProcAddress( RString s )
return symbol ? NSAddressOfSymbol( symbol ) : NULL;
}
RString LowLevelWindow_Cocoa::TryVideoMode( const VideoModeParams& p, bool& newDeviceOut )
RString LowLevelWindow_MacOSX::TryVideoMode( const VideoModeParams& p, bool& newDeviceOut )
{
// Always set these params.
m_CurrentParams.bSmoothLines = p.bSmoothLines;
@@ -432,7 +432,7 @@ RString LowLevelWindow_Cocoa::TryVideoMode( const VideoModeParams& p, bool& newD
return RString();
}
void LowLevelWindow_Cocoa::ShutDownFullScreen()
void LowLevelWindow_MacOSX::ShutDownFullScreen()
{
if( m_CurrentParams.windowed )
return;
@@ -462,7 +462,7 @@ void LowLevelWindow_Cocoa::ShutDownFullScreen()
m_CurrentParams.windowed = true;
}
int LowLevelWindow_Cocoa::ChangeDisplayMode( const VideoModeParams& p )
int LowLevelWindow_MacOSX::ChangeDisplayMode( const VideoModeParams& p )
{
CFDictionaryRef mode = NULL;
CFDictionaryRef newMode;
@@ -497,7 +497,7 @@ int LowLevelWindow_Cocoa::ChangeDisplayMode( const VideoModeParams& p )
return 0;
}
void LowLevelWindow_Cocoa::SetActualParamsFromMode( CFDictionaryRef mode )
void LowLevelWindow_MacOSX::SetActualParamsFromMode( CFDictionaryRef mode )
{
SInt32 rate;
bool ret = CFNumberGetValue( (CFNumberRef)CFDictionaryGetValue(mode, CFSTR("RefreshRate")),
@@ -541,7 +541,7 @@ static bool GetBoolValue( CFTypeRef r )
return r && CFGetTypeID( r ) == CFBooleanGetTypeID() && CFBooleanGetValue( CFBooleanRef(r) );
}
void LowLevelWindow_Cocoa::GetDisplayResolutions( DisplayResolutions &dr ) const
void LowLevelWindow_MacOSX::GetDisplayResolutions( DisplayResolutions &dr ) const
{
CFArrayRef modes = CGDisplayAvailableModes( kCGDirectMainDisplay );
ASSERT( modes );
@@ -565,7 +565,7 @@ void LowLevelWindow_Cocoa::GetDisplayResolutions( DisplayResolutions &dr ) const
// Do not release modes! We don't own them here.
}
float LowLevelWindow_Cocoa::GetMonitorAspectRatio() const
float LowLevelWindow_MacOSX::GetMonitorAspectRatio() const
{
io_connect_t displayPort = CGDisplayIOServicePort( CGMainDisplayID() );
CFDictionaryRef dict = IODisplayCreateInfoDictionary( displayPort, 0 );
@@ -579,12 +579,12 @@ float LowLevelWindow_Cocoa::GetMonitorAspectRatio() const
return 4/3.f;
}
void LowLevelWindow_Cocoa::SwapBuffers()
void LowLevelWindow_MacOSX::SwapBuffers()
{
CGLFlushDrawable( CGLGetCurrentContext() );
}
void LowLevelWindow_Cocoa::Update()
void LowLevelWindow_MacOSX::Update()
{
// Keep the system from sleeping or the screen saver from activating.
UpdateSystemActivity( IdleActivity );
@@ -602,12 +602,12 @@ void LowLevelWindow_Cocoa::Update()
DISPLAY->ResolutionChanged();
}
RenderTarget *LowLevelWindow_Cocoa::CreateRenderTarget()
RenderTarget *LowLevelWindow_MacOSX::CreateRenderTarget()
{
return new RenderTarget_Cocoa( m_Context );
return new RenderTarget_MacOSX( m_Context );
}
void LowLevelWindow_Cocoa::BeginConcurrentRendering()
void LowLevelWindow_MacOSX::BeginConcurrentRendering()
{
if( m_CurrentParams.windowed )
[m_BGContext setView:[((SMWindowDelegate *)m_WindowDelegate)->m_Window contentView]];
@@ -1,5 +1,5 @@
#include "global.h"
#include "MemoryCardDriverThreaded_OSX.h"
#include "MemoryCardDriverThreaded_MacOSX.h"
#include "Foreach.h"
#include "RageUtil.h"
#include "RageLog.h"
@@ -15,16 +15,16 @@
#include <paths.h>
#include <unistd.h>
OSStatus MemoryCardDriverThreaded_OSX::VolumeChanged( EventHandlerCallRef ref, EventRef event, void *p )
OSStatus MemoryCardDriverThreaded_MacOSX::VolumeChanged( EventHandlerCallRef ref, EventRef event, void *p )
{
MemoryCardDriverThreaded_OSX *This = (MemoryCardDriverThreaded_OSX *)p;
MemoryCardDriverThreaded_MacOSX *This = (MemoryCardDriverThreaded_MacOSX *)p;
LockMut( This->m_ChangedLock );
This->m_bChanged = true;
return eventNotHandledErr; // let others do something
}
MemoryCardDriverThreaded_OSX::MemoryCardDriverThreaded_OSX() : m_ChangedLock( "MC changed lock" )
MemoryCardDriverThreaded_MacOSX::MemoryCardDriverThreaded_MacOSX() : m_ChangedLock( "MC changed lock" )
{
m_bChanged = true;
m_HandlerUPP = NewEventHandlerUPP( VolumeChanged );
@@ -37,13 +37,13 @@ MemoryCardDriverThreaded_OSX::MemoryCardDriverThreaded_OSX() : m_ChangedLock( "M
ASSERT( ret == noErr );
}
MemoryCardDriverThreaded_OSX::~MemoryCardDriverThreaded_OSX()
MemoryCardDriverThreaded_MacOSX::~MemoryCardDriverThreaded_MacOSX()
{
RemoveEventHandler( m_Handler );
DisposeEventHandlerUPP( m_HandlerUPP );
}
void MemoryCardDriverThreaded_OSX::Unmount( UsbStorageDevice *pDevice )
void MemoryCardDriverThreaded_MacOSX::Unmount( UsbStorageDevice *pDevice )
{
ParamBlockRec pb;
Str255 name; // A pascal string.
@@ -59,7 +59,7 @@ void MemoryCardDriverThreaded_OSX::Unmount( UsbStorageDevice *pDevice )
LOG->Warn( "Failed to flush the memory card." );
}
bool MemoryCardDriverThreaded_OSX::USBStorageDevicesChanged()
bool MemoryCardDriverThreaded_MacOSX::USBStorageDevicesChanged()
{
LockMut( m_ChangedLock );
return m_bChanged;
@@ -108,7 +108,7 @@ static RString GetStringProperty( io_registry_entry_t entry, CFStringRef key )
return ret;
}
void MemoryCardDriverThreaded_OSX::GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut )
void MemoryCardDriverThreaded_MacOSX::GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut )
{
LockMut( m_ChangedLock );
// First, get all device paths
@@ -222,7 +222,7 @@ void MemoryCardDriverThreaded_OSX::GetUSBStorageDevices( vector<UsbStorageDevice
delete[] fs;
}
bool MemoryCardDriverThreaded_OSX::TestWrite( UsbStorageDevice *pDevice )
bool MemoryCardDriverThreaded_MacOSX::TestWrite( UsbStorageDevice *pDevice )
{
if( access(pDevice->sOsMountDir, W_OK) )
{
@@ -1,5 +1,5 @@
#ifndef MEMORY_CARD_DRIVER_THREADED_OSX
#define MEMORY_CARD_DRIVER_THREADED_OSX
#ifndef MEMORY_CARD_DRIVER_THREADED_MACOSX_H
#define MEMORY_CARD_DRIVER_THREADED_MACOSX_H
#include "MemoryCardDriver.h"
#include "RageThreads.h"
@@ -14,11 +14,11 @@ typedef OSStatus (*EventHandlerProcPtr)( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void * inUserData );
typedef EventHandlerProcPtr EventHandlerUPP;
class MemoryCardDriverThreaded_OSX : public MemoryCardDriver
class MemoryCardDriverThreaded_MacOSX : public MemoryCardDriver
{
public:
MemoryCardDriverThreaded_OSX();
~MemoryCardDriverThreaded_OSX();
MemoryCardDriverThreaded_MacOSX();
~MemoryCardDriverThreaded_MacOSX();
bool Mount( UsbStorageDevice *pDevice ) { return true; }
void Unmount( UsbStorageDevice *pDevice );
@@ -39,7 +39,7 @@ private:
#ifdef ARCH_MEMORY_CARD_DRIVER
#error "More than one MemoryCardDriver selected."
#endif
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_OSX
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_MacOSX
#endif
+5 -5
View File
@@ -13,11 +13,11 @@
#elif defined(MACOSX)
#include "ArchHooks/ArchHooks_darwin.h"
#include "LoadingWindow/LoadingWindow_Cocoa.h"
#include "LowLevelWindow/LowLevelWindow_Cocoa.h"
#include "MemoryCard/MemoryCardDriverThreaded_OSX.h"
#define DEFAULT_INPUT_DRIVER_LIST "Carbon"
#include "ArchHooks/ArchHooks_MacOSX.h"
#include "LoadingWindow/LoadingWindow_MacOSX.h"
#include "LowLevelWindow/LowLevelWindow_MacOSX.h"
#include "MemoryCard/MemoryCardDriverThreaded_MacOSX.h"
#define DEFAULT_INPUT_DRIVER_LIST "HID"
#define DEFAULT_MOVIE_DRIVER_LIST "Theora,FFMpeg,Null"
#define DEFAULT_SOUND_DRIVER_LIST "AudioUnit,Null"