From fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 15:58:40 +0300 Subject: PBYTE -> uint8_t* --- plugins/MirandaG15/src/CAppletManager.cpp | 2 +- plugins/MirandaG15/src/LCDFramework/CLCDConnection.cpp | 2 +- plugins/MirandaG15/src/LCDFramework/CLCDConnection.h | 2 +- plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp | 6 +++--- plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h | 4 ++-- plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp | 8 ++++---- plugins/MirandaG15/src/LCDFramework/CLCDGfx.h | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/MirandaG15/src') diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 00ed5f39ac..944d5c3f16 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -656,7 +656,7 @@ void CAppletManager::FinishMessageJob(SMessageJob *pJob) return; dbei.cbBlob = pJob->iBufferSize; - dbei.pBlob = (PBYTE)pJob->pcBuffer; + dbei.pBlob = (uint8_t*)pJob->pcBuffer; db_event_add(pJob->hContact, &dbei); } diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnection.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.cpp index 084722b8cf..3b5dfd7ef4 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnection.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.cpp @@ -131,7 +131,7 @@ int CLCDConnection::GetColorCount() //************************************************************************ // Get the pointer to the pixel buffer //************************************************************************ -PBYTE CLCDConnection::GetPixelBuffer() +uint8_t *CLCDConnection::GetPixelBuffer() { return nullptr; } diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h index 9c17b81d75..9da366db19 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnection.h @@ -64,7 +64,7 @@ public: virtual int GetColorCount(); // Get the pointer to the pixel buffer - virtual PBYTE GetPixelBuffer(); + virtual uint8_t *GetPixelBuffer(); public: CLCDConnection(); diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp index a6902e6a55..890f1b9bb0 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp @@ -287,7 +287,7 @@ bool CLCDConnectionLogitech::Connect(int iIndex) m_pPixels = OpenContext.deviceType == LGLCD_DEVICE_QVGA ? m_lcdBitmap.bmp_qvga32.pixels : m_lcdBitmap.bmp_mono.pixels; m_iPixels = OpenContext.deviceType == LGLCD_DEVICE_QVGA ? sizeof(m_lcdBitmap.bmp_qvga32.pixels) : sizeof(m_lcdBitmap.bmp_mono.pixels); - m_pDrawingBuffer = (PBYTE)malloc(m_iPixels); + m_pDrawingBuffer = (uint8_t*)malloc(m_iPixels); memset(m_pDrawingBuffer, 0, m_iPixels); m_iPriority = LGLCD_PRIORITY_NORMAL; @@ -615,12 +615,12 @@ int CLCDConnectionLogitech::GetColorCount() //************************************************************************ // Get the pointer to the pixel buffer //************************************************************************ -PBYTE CLCDConnectionLogitech::GetPixelBuffer() +uint8_t *CLCDConnectionLogitech::GetPixelBuffer() { if (!GetConnectionState() == CONNECTED) return nullptr; - return (PBYTE)m_pDrawingBuffer; + return (uint8_t*)m_pDrawingBuffer; } //************************************************************************ diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h index 38d897e6d9..c3bf9f78c5 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.h @@ -78,7 +78,7 @@ public: int GetColorCount(); // Returns a pointer to the pixel buffer - PBYTE GetPixelBuffer(); + uint8_t *GetPixelBuffer(); //---------------------------------------------- // Special functions to control the lights @@ -101,7 +101,7 @@ public: //---------------------------------------------- void runDrawingThread(); private: - PBYTE m_pDrawingBuffer; + uint8_t *m_pDrawingBuffer; CLgLCDDevice *m_pConnectedDevice; // the connection instance diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp index 7712cf1d36..241ddddd30 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp @@ -49,7 +49,7 @@ CLCDGfx::~CLCDGfx(void) //************************************************************************ // CLCDGfx::Initialize //************************************************************************ -bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits) +bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, uint8_t *pLcdBitmapBits) { m_pLcdBitmapBits = pLcdBitmapBits; @@ -365,8 +365,8 @@ void CLCDGfx::EndDraw(void) Cache(); } - PBYTE pScreen1 = m_pSavedBitmapBits; - PBYTE pScreen2 = m_pBitmapBits; + uint8_t *pScreen1 = m_pSavedBitmapBits; + uint8_t *pScreen2 = m_pBitmapBits; DWORD dwTimeElapsed = GetTickCount() - m_dwTransitionStart; @@ -550,7 +550,7 @@ HBITMAP CLCDGfx::GetHBITMAP(void) return m_hBitmap; } -int CLCDGfx::findNearestMatch(PBYTE targetArray, int iSourceIndex) +int CLCDGfx::findNearestMatch(uint8_t *targetArray, int iSourceIndex) { int startY = iSourceIndex / m_nWidth; int startX = iSourceIndex - (iSourceIndex / m_nWidth)*m_nWidth; diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h index 2cc940e23b..b4e7c3c8e0 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.h @@ -18,7 +18,7 @@ public: CLCDGfx(void); virtual ~CLCDGfx(void); - bool Initialize(int nWidth, int nHeight, int nBPP, PBYTE pBitmapBits); + bool Initialize(int nWidth, int nHeight, int nBPP, uint8_t *pBitmapBits); bool IsInitialized(); bool Shutdown(void); @@ -49,7 +49,7 @@ public: protected: void Cache(); - int findNearestMatch(PBYTE targetArray, int iSourceIndex); + int findNearestMatch(uint8_t *targetArray, int iSourceIndex); void EndTransition(); @@ -63,7 +63,7 @@ protected: HDC m_hDC; HBITMAP m_hBitmap; HBITMAP m_hPrevBitmap; - PBYTE m_pBitmapBits, m_pLcdBitmapBits, m_pSavedBitmapBits; + uint8_t *m_pBitmapBits, *m_pLcdBitmapBits, *m_pSavedBitmapBits; bool m_bInitialized; -- cgit v1.2.3