Thorough(!) remodeling of the arch/ directory and the contents therein; fixed link-time warnings on GCC and should make things a lot easier to manage. A pile of other random things too, mostly cleanups and getting things to work with the remodeled arch/ directory.
This commit is contained in:
@@ -5,16 +5,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
/* Hmm. I don't want this to depend on other arch drivers--we should be able to test
|
||||
* this without linking to them. We probably don't actually have to do that just by
|
||||
* #including the headers in arch_Win32.h, etc., but it's still messy ... */
|
||||
#if defined(_WINDOWS)
|
||||
#include "DialogDriver_Win32.h"
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
#include "DialogDriver_Cocoa.h"
|
||||
#endif
|
||||
#include "Selector_Dialog.h"
|
||||
|
||||
static DialogDriver *g_pImpl = NULL;
|
||||
static DialogDriver_Null g_NullDriver;
|
||||
@@ -37,13 +28,15 @@ void Dialog::Init()
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
|
||||
#if defined(HAVE_DIALOG_WIN32)
|
||||
#if defined(USE_DIALOG_DRIVER_WIN32)
|
||||
if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32;
|
||||
#endif
|
||||
#if defined(HAVE_DIALOG_COCOA)
|
||||
#if defined(USE_DIALOG_DRIVER_COCOA)
|
||||
if( !DriversToTry[i].CompareNoCase("Cocoa") ) g_pImpl = new DialogDriver_Cocoa;
|
||||
#endif
|
||||
#if defined(USE_DIALOG_DRIVER_NULL)
|
||||
if( !DriversToTry[i].CompareNoCase("Null") ) g_pImpl = new DialogDriver_Null;
|
||||
#endif
|
||||
|
||||
if( g_pImpl == NULL )
|
||||
continue;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
};
|
||||
|
||||
class DialogDriver_Null: public DialogDriver { };
|
||||
#define USE_DIALOG_DRIVER_NULL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ public:
|
||||
void OK(CString sMessage, CString ID);
|
||||
Dialog::Result AbortRetryIgnore(CString sMessage, CString ID);
|
||||
};
|
||||
|
||||
#define HAVE_DIALOG_COCOA
|
||||
#define USE_DIALOG_DRIVER_COCOA
|
||||
|
||||
#endif /* ARCH_HOOKS_DARWIN_H */
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public:
|
||||
Dialog::Result AbortRetryIgnore( CString sMessage, CString ID );
|
||||
Dialog::Result AbortRetry( CString sMessage, CString ID );
|
||||
};
|
||||
|
||||
#define HAVE_DIALOG_WIN32
|
||||
#define USE_DIALOG_DRIVER_WIN32
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef SELECTOR_DIALOG
|
||||
#define SELECTOR_DIALOG
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* Dialog drivers selector. */
|
||||
#ifdef HAVE_WIN32
|
||||
#include "DialogDriver_Win32.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COCOA
|
||||
#include "DialogDriver_Cocoa.h"
|
||||
#endif
|
||||
|
||||
#include "DialogDriver.h" // DialogDriver_Null is in here
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
Reference in New Issue
Block a user