Fix Windows x64 type inconsistency regarding RageTexture

This commit is contained in:
Prcuvu
2019-10-03 08:58:14 +08:00
parent 7e96188088
commit 54c067f48d
18 changed files with 107 additions and 105 deletions
@@ -318,7 +318,7 @@ public:
virtual ~RenderTarget_Win32();
void Create( const RenderTargetParam &param, 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();
@@ -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();
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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)