Merge: Windows x64 build support (#1899)
This commit is contained in:
@@ -29,7 +29,7 @@ static RString g_sMessage;
|
||||
static bool g_bAllowHush;
|
||||
|
||||
#if !defined(SMPACKAGE)
|
||||
static BOOL CALLBACK OKWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
static INT_PTR CALLBACK OKWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( msg )
|
||||
{
|
||||
@@ -139,7 +139,7 @@ Dialog::Result DialogDriver_Win32::OKCancel( RString sMessage, RString sID )
|
||||
#if !defined(SMPACKAGE)
|
||||
static RString g_sErrorString;
|
||||
|
||||
static BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
static INT_PTR CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( msg )
|
||||
{
|
||||
@@ -208,7 +208,7 @@ static BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
}
|
||||
|
||||
// TODO: Return a different brush if the default is not desired
|
||||
return (BOOL)hbr;
|
||||
return reinterpret_cast<INT_PTR>(hbr);
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
REGISTER_INPUT_HANDLER_CLASS2( MIDI, Win32_MIDI );
|
||||
|
||||
static HMIDIIN g_device;
|
||||
static void CALLBACK midiCallback(HMIDIIN g_device, UINT status, DWORD instancePtr, DWORD data, DWORD timestamp);
|
||||
static void CALLBACK midiCallback(HMIDIIN g_device, UINT status, DWORD_PTR instancePtr, DWORD_PTR data, DWORD_PTR timestamp);
|
||||
|
||||
static RString GetMidiError( MMRESULT result )
|
||||
{
|
||||
@@ -33,7 +33,7 @@ InputHandler_Win32_MIDI::InputHandler_Win32_MIDI()
|
||||
}
|
||||
m_bFoundDevice = true;
|
||||
|
||||
MMRESULT result = midiInOpen( &g_device, device_id, (DWORD) &midiCallback, (DWORD) this, CALLBACK_FUNCTION );
|
||||
MMRESULT result = midiInOpen( &g_device, device_id, reinterpret_cast<DWORD_PTR>(&midiCallback), reinterpret_cast<DWORD_PTR>(this), CALLBACK_FUNCTION );
|
||||
if( result != MMSYSERR_NOERROR )
|
||||
{
|
||||
LOG->Warn( "Error opening MIDI device: %s", GetMidiError(result).c_str() );
|
||||
@@ -75,7 +75,7 @@ void InputHandler_Win32_MIDI::GetDevicesAndDescriptions( vector<InputDeviceInfo>
|
||||
}
|
||||
}
|
||||
|
||||
static void CALLBACK midiCallback( HMIDIIN device, UINT status, DWORD instancePtr, DWORD data, DWORD timestamp )
|
||||
static void CALLBACK midiCallback( HMIDIIN device, UINT status, DWORD_PTR instancePtr, DWORD_PTR data, DWORD_PTR timestamp )
|
||||
{
|
||||
if( status == MIM_DATA )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ static void CALLBACK midiCallback( HMIDIIN device, UINT status, DWORD instancePt
|
||||
{
|
||||
DeviceInput di = DeviceInput( DEVICE_MIDI, enum_add2(MIDI_FIRST, iChannel), iValue > 0 );
|
||||
di.ts.Touch();
|
||||
((InputHandler_Win32_MIDI *)instancePtr)->SetDev( di );
|
||||
(reinterpret_cast<InputHandler_Win32_MIDI*>(instancePtr))->SetDev( di );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ static HBITMAP LoadWin32Surface( RString sFile, HWND hWnd )
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
INT_PTR CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( msg )
|
||||
{
|
||||
@@ -118,8 +118,7 @@ void LoadingWindow_Win32::SetIcon( const RageSurface *pIcon )
|
||||
|
||||
m_hIcon = IconFromSurface( pIcon );
|
||||
if( m_hIcon != nullptr )
|
||||
// XXX: GCL_HICON isn't available on x86-64 Windows
|
||||
SetClassLong( hwnd, GCL_HICON, (LONG) m_hIcon );
|
||||
SetClassLongPtrA( hwnd, GCLP_HICON, reinterpret_cast<LONG_PTR>(m_hIcon) );
|
||||
}
|
||||
|
||||
void LoadingWindow_Win32::SetSplash( const RageSurface *pSplash )
|
||||
|
||||
@@ -27,7 +27,7 @@ private:
|
||||
RString text[3];
|
||||
HICON m_hIcon;
|
||||
|
||||
static BOOL CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
static INT_PTR CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
};
|
||||
#define USE_LOADING_WINDOW_WIN32
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
RenderTarget_MacOSX( id shareContext );
|
||||
~RenderTarget_MacOSX();
|
||||
void Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut );
|
||||
unsigned GetTexture() const { return m_iTexHandle; }
|
||||
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_iTexHandle); }
|
||||
void StartRenderingTo();
|
||||
void FinishRenderingTo();
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
virtual ~RenderTarget_Win32();
|
||||
|
||||
void Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut );
|
||||
unsigned int GetTexture() const { return m_texHandle; }
|
||||
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_texHandle); }
|
||||
void StartRenderingTo();
|
||||
void FinishRenderingTo();
|
||||
|
||||
|
||||
@@ -758,7 +758,7 @@ public:
|
||||
~RenderTarget_X11();
|
||||
|
||||
void Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut );
|
||||
unsigned GetTexture() const { return m_iTexHandle; }
|
||||
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_iTexHandle); }
|
||||
void StartRenderingTo();
|
||||
void FinishRenderingTo();
|
||||
|
||||
@@ -770,7 +770,7 @@ private:
|
||||
LowLevelWindow_X11 *m_pWind;
|
||||
GLXPbuffer m_iPbuffer;
|
||||
GLXContext m_pPbufferContext;
|
||||
unsigned int m_iTexHandle;
|
||||
GLuint m_iTexHandle;
|
||||
|
||||
GLXContext m_pOldContext;
|
||||
GLXDrawable m_pOldDrawable;
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
|
||||
virtual void Invalidate() { m_uTexHandle = 0; }
|
||||
virtual void Reload() { }
|
||||
virtual unsigned GetTexHandle() const
|
||||
virtual uintptr_t GetTexHandle() const
|
||||
{
|
||||
return m_uTexHandle;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ private:
|
||||
delete pSurface;
|
||||
}
|
||||
|
||||
unsigned m_uTexHandle;
|
||||
uintptr_t m_uTexHandle;
|
||||
RageSurfaceFormat m_SurfaceFormat;
|
||||
RagePixelFormat m_PixFmt;
|
||||
};
|
||||
@@ -449,7 +449,7 @@ void MovieTexture_Generic::UpdateFrame()
|
||||
|
||||
if( m_pTextureLock != nullptr )
|
||||
{
|
||||
int iHandle = m_pTextureIntermediate != nullptr? m_pTextureIntermediate->GetTexHandle(): this->GetTexHandle();
|
||||
uintptr_t iHandle = m_pTextureIntermediate != nullptr? m_pTextureIntermediate->GetTexHandle(): this->GetTexHandle();
|
||||
m_pTextureLock->Lock( iHandle, m_pSurface );
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ void MovieTexture_Generic::SetPosition( float fSeconds )
|
||||
m_bWantRewind = true;
|
||||
}
|
||||
|
||||
unsigned MovieTexture_Generic::GetTexHandle() const
|
||||
uintptr_t MovieTexture_Generic::GetTexHandle() const
|
||||
{
|
||||
if( m_pRenderTarget != nullptr )
|
||||
return m_pRenderTarget->GetTexHandle();
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
virtual void DecodeSeconds( float fSeconds );
|
||||
virtual void SetPlaybackRate( float fRate ) { m_fRate = fRate; }
|
||||
void SetLooping( bool bLooping=true ) { m_bLoop = bLooping; }
|
||||
unsigned GetTexHandle() const;
|
||||
uintptr_t GetTexHandle() const;
|
||||
|
||||
static EffectMode GetEffectMode( MovieDecoderPixelFormatYCbCr fmt );
|
||||
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
|
||||
enum State { DECODER_QUIT, DECODER_RUNNING } m_State;
|
||||
|
||||
unsigned m_uTexHandle;
|
||||
uintptr_t m_uTexHandle;
|
||||
RageTextureRenderTarget *m_pRenderTarget;
|
||||
RageTexture *m_pTextureIntermediate;
|
||||
Sprite *m_pSprite;
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
MovieTexture_Null(RageTextureID ID);
|
||||
virtual ~MovieTexture_Null();
|
||||
void Invalidate() { texHandle = 0; }
|
||||
unsigned GetTexHandle() const { return texHandle; }
|
||||
uintptr_t GetTexHandle() const { return texHandle; }
|
||||
void Update(float /* delta */) { }
|
||||
void Reload() { }
|
||||
void SetPosition(float /* seconds */) { }
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
private:
|
||||
bool playing;
|
||||
bool loop;
|
||||
unsigned texHandle;
|
||||
uintptr_t texHandle;
|
||||
};
|
||||
|
||||
MovieTexture_Null::MovieTexture_Null(RageTextureID ID) : RageMovieTexture(ID)
|
||||
|
||||
Reference in New Issue
Block a user