Xbox builds again
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#include "global.h"
|
||||
#include "ArchHooks_Xbox.h"
|
||||
#include "dsound.h" // for timeGetTime
|
||||
|
||||
static bool g_bTimerInitialized;
|
||||
static DWORD g_iStartTime;
|
||||
|
||||
static void InitTimer()
|
||||
{
|
||||
if( g_bTimerInitialized )
|
||||
return;
|
||||
g_bTimerInitialized = true;
|
||||
|
||||
g_iStartTime = timeGetTime();
|
||||
}
|
||||
|
||||
int64_t ArchHooks::GetMicrosecondsSinceStart( bool bAccurate )
|
||||
{
|
||||
if( !g_bTimerInitialized )
|
||||
InitTimer();
|
||||
|
||||
return (timeGetTime() - g_iStartTime) * 1000;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard, Chris Danford
|
||||
* 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.
|
||||
*/
|
||||
@@ -0,0 +1,47 @@
|
||||
#ifndef ARCH_HOOKS_XBOX_H
|
||||
#define ARCH_HOOKS_XBOX_H
|
||||
|
||||
#include "ArchHooks.h"
|
||||
class RageMutex;
|
||||
|
||||
class ArchHooks_Xbox: public ArchHooks
|
||||
{
|
||||
public:
|
||||
ArchHooks_Xbox() {}
|
||||
~ArchHooks_Xbox() {}
|
||||
void DumpDebugInfo() {}
|
||||
void RestartProgram() {}
|
||||
|
||||
void EnterTimeCriticalSection() {}
|
||||
void ExitTimeCriticalSection() {}
|
||||
void SetTime( tm newtime ) {}
|
||||
};
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
#define ARCH_HOOKS ArchHooks_Xbox
|
||||
|
||||
#endif
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard, Chris Danford
|
||||
* 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.
|
||||
*/
|
||||
@@ -8,7 +8,7 @@
|
||||
/* 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(WIN32)
|
||||
#if defined(_WINDOWS)
|
||||
#include "DialogDriver_Win32.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ BOOL CALLBACK DSound::EnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription, LPC
|
||||
{
|
||||
sLine += ssprintf( " (%s", lpcstrModule );
|
||||
|
||||
#ifndef _XBOX
|
||||
CString sPath = FindSystemFile( lpcstrModule );
|
||||
if( sPath != "" )
|
||||
{
|
||||
@@ -26,6 +27,7 @@ BOOL CALLBACK DSound::EnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription, LPC
|
||||
if( GetFileVersion( sPath, ver ) )
|
||||
sLine += ssprintf(" %s", ver.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
sLine += ")";
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#define THREADS_WIN32_H
|
||||
|
||||
#include "Threads.h"
|
||||
#include <windows.h>
|
||||
#if defined(_WINDOWS)
|
||||
# include <windows.h>
|
||||
#else if
|
||||
# include <windef.h>
|
||||
#endif
|
||||
|
||||
class ThreadImpl_Win32: public ThreadImpl
|
||||
{
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
#define XBOX_ARCH_H
|
||||
|
||||
/* Load drivers for Xbox. */
|
||||
//#include "ErrorDialog/ErrorDialog_null.h"
|
||||
#include "ArchHooks/ArchHooks_none.h"
|
||||
|
||||
#include "LoadingWindow/LoadingWindow_Null.h"
|
||||
|
||||
#include "ArchHooks/ArchHooks_Xbox.h"
|
||||
|
||||
/* Err, is SDL input working on Xbox? arch_default comments indicated no.
|
||||
* (Best to use a custom driver for threaded input, anyway.) */
|
||||
/* I believe it is working, and it's the only thing we depend on SDL for.
|
||||
* I'll write an InputHandler so we can ditch the SDLXbox mess. -Chris */
|
||||
#include "InputHandler/InputHandler_SDL.h"
|
||||
|
||||
#include "Sound/RageSoundDriver_DSound.h"
|
||||
|
||||
#include "LoadingWindow/LoadingWindow_SDL.h"
|
||||
|
||||
/* Undef this if you need no SDL input. */
|
||||
// #undef SUPPORT_SDL_INPUT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user