From 6e44065a33b757998a610f401a92cabfc4bb2747 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 29 Apr 2008 05:48:50 +0000 Subject: [PATCH] More consistent file names. --- ...hHooks_darwin.cpp => ArchHooks_MacOSX.cpp} | 12 ++--- ...{ArchHooks_darwin.h => ArchHooks_MacOSX.h} | 10 ++-- ...iver_Cocoa.cpp => DialogDriver_MacOSX.cpp} | 12 ++--- ...ogDriver_Cocoa.h => DialogDriver_MacOSX.h} | 6 +-- ...Carbon.cpp => InputHandler_MacOSX_HID.cpp} | 44 +++++++++--------- ...ler_Carbon.h => InputHandler_MacOSX_HID.h} | 10 ++-- .../src/arch/LoadingWindow/LoadingWindow.cpp | 6 +-- ...gWindow_Cocoa.h => LoadingWindow_MacOSX.h} | 14 +++--- ...indow_Cocoa.mm => LoadingWindow_MacOSX.mm} | 8 ++-- ...Window_Cocoa.h => LowLevelWindow_MacOSX.h} | 12 ++--- ...ndow_Cocoa.mm => LowLevelWindow_MacOSX.mm} | 46 +++++++++---------- ...pp => MemoryCardDriverThreaded_MacOSX.cpp} | 18 ++++---- ...SX.h => MemoryCardDriverThreaded_MacOSX.h} | 12 ++--- stepmania/src/arch/arch_default.h | 10 ++-- 14 files changed, 110 insertions(+), 110 deletions(-) rename stepmania/src/arch/ArchHooks/{ArchHooks_darwin.cpp => ArchHooks_MacOSX.cpp} (98%) rename stepmania/src/arch/ArchHooks/{ArchHooks_darwin.h => ArchHooks_MacOSX.h} (90%) rename stepmania/src/arch/Dialog/{DialogDriver_Cocoa.cpp => DialogDriver_MacOSX.cpp} (91%) rename stepmania/src/arch/Dialog/{DialogDriver_Cocoa.h => DialogDriver_MacOSX.h} (93%) rename stepmania/src/arch/InputHandler/{InputHandler_Carbon.cpp => InputHandler_MacOSX_HID.cpp} (89%) rename stepmania/src/arch/InputHandler/{InputHandler_Carbon.h => InputHandler_MacOSX_HID.h} (93%) rename stepmania/src/arch/LoadingWindow/{LoadingWindow_Cocoa.h => LoadingWindow_MacOSX.h} (84%) rename stepmania/src/arch/LoadingWindow/{LoadingWindow_Cocoa.mm => LoadingWindow_MacOSX.mm} (96%) rename stepmania/src/arch/LowLevelWindow/{LowLevelWindow_Cocoa.h => LowLevelWindow_MacOSX.h} (91%) rename stepmania/src/arch/LowLevelWindow/{LowLevelWindow_Cocoa.mm => LowLevelWindow_MacOSX.mm} (93%) rename stepmania/src/arch/MemoryCard/{MemoryCardDriverThreaded_OSX.cpp => MemoryCardDriverThreaded_MacOSX.cpp} (91%) rename stepmania/src/arch/MemoryCard/{MemoryCardDriverThreaded_OSX.h => MemoryCardDriverThreaded_MacOSX.h} (89%) diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp b/stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.cpp similarity index 98% rename from stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp rename to stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.cpp index efdd75c141..51991a29d2 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.cpp @@ -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 ); diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h b/stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.h similarity index 90% rename from stepmania/src/arch/ArchHooks/ArchHooks_darwin.h rename to stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.h index 66799ced9f..0c18db6d67 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h +++ b/stepmania/src/arch/ArchHooks/ArchHooks_MacOSX.h @@ -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 diff --git a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp b/stepmania/src/arch/Dialog/DialogDriver_MacOSX.cpp similarity index 91% rename from stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp rename to stepmania/src/arch/Dialog/DialogDriver_MacOSX.cpp index e463ebc751..41d2919b0f 100644 --- a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp +++ b/stepmania/src/arch/Dialog/DialogDriver_MacOSX.cpp @@ -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 -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" ); diff --git a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.h b/stepmania/src/arch/Dialog/DialogDriver_MacOSX.h similarity index 93% rename from stepmania/src/arch/Dialog/DialogDriver_Cocoa.h rename to stepmania/src/arch/Dialog/DialogDriver_MacOSX.h index 4af35f5c07..19dbd5e873 100644 --- a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.h +++ b/stepmania/src/arch/Dialog/DialogDriver_MacOSX.h @@ -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 ); diff --git a/stepmania/src/arch/InputHandler/InputHandler_Carbon.cpp b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp similarity index 89% rename from stepmania/src/arch/InputHandler/InputHandler_Carbon.cpp rename to stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp index 48ffaa8f03..e6d97f694b 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Carbon.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp @@ -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 #include -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& vDevices ) +void InputHandler_MacOSX_HID::GetDevicesAndDescriptions( vector& 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 ) diff --git a/stepmania/src/arch/InputHandler/InputHandler_Carbon.h b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h similarity index 93% rename from stepmania/src/arch/InputHandler/InputHandler_Carbon.h rename to stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h index 27e3aeb7d4..683c6dbab6 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Carbon.h +++ b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h @@ -1,5 +1,5 @@ -#ifndef JOYSTICK_H -#define JOYSTICK_H +#ifndef INPUT_HANDLER_MACOSX_HID_H +#define INPUT_HANDLER_MACOSX_HID_H #include #include @@ -9,7 +9,7 @@ class HIDDevice; -class InputHandler_Carbon : public InputHandler +class InputHandler_MacOSX_HID : public InputHandler { private: vector 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& vDevicesOut ); diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp b/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp index 57e2f719e6..0a43d6e267 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp @@ -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 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; diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.h b/stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.h similarity index 84% rename from stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.h rename to stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.h index 0ada6f680e..242d79adda 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.h +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.h @@ -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 diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.mm b/stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.mm similarity index 96% rename from stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.mm rename to stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.mm index 2d915d2039..4f26434a41 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow_Cocoa.mm +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow_MacOSX.mm @@ -1,6 +1,6 @@ #import #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; diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.h b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h similarity index 91% rename from stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.h rename to stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h index 2a39e980c9..09525ab323 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.h +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h @@ -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 diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.mm similarity index 93% rename from stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm rename to stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.mm index 2ba99e654a..05ee94c4d3 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.mm @@ -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 ¶m, 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 ¶m, int &iTextureWidthOut, int &iTextureHeightOut ) +void RenderTarget_MacOSX::Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut ) { POOL; m_iWidth = param.iWidth; @@ -260,7 +260,7 @@ void RenderTarget_Cocoa::Create( const RenderTargetParam ¶m, 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]]; diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.cpp similarity index 91% rename from stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.cpp rename to stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.cpp index 26638ca06d..bbe2e9730b 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.cpp @@ -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 #include -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& vDevicesOut ) +void MemoryCardDriverThreaded_MacOSX::GetUSBStorageDevices( vector& vDevicesOut ) { LockMut( m_ChangedLock ); // First, get all device paths @@ -222,7 +222,7 @@ void MemoryCardDriverThreaded_OSX::GetUSBStorageDevices( vectorsOsMountDir, W_OK) ) { diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.h b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.h similarity index 89% rename from stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.h rename to stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.h index c7d4599559..261cab133c 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_OSX.h +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_MacOSX.h @@ -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 diff --git a/stepmania/src/arch/arch_default.h b/stepmania/src/arch/arch_default.h index 14868dd1f2..3826fe271c 100644 --- a/stepmania/src/arch/arch_default.h +++ b/stepmania/src/arch/arch_default.h @@ -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"