From 62a186697df33c96dc1a6dac0f4dfc38652fb96f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 16:39:04 +0300 Subject: BYTE -> uint8_t --- plugins/KeyboardNotify/src/flash.cpp | 26 +++++++------- plugins/KeyboardNotify/src/flash.h | 4 +-- plugins/KeyboardNotify/src/keyboard.cpp | 4 +-- plugins/KeyboardNotify/src/keyboard.h | 2 +- plugins/KeyboardNotify/src/keypresses.cpp | 18 +++++----- plugins/KeyboardNotify/src/keypresses.h | 2 +- plugins/KeyboardNotify/src/main.cpp | 56 +++++++++++++++---------------- plugins/KeyboardNotify/src/options.cpp | 54 ++++++++++++++--------------- 8 files changed, 83 insertions(+), 83 deletions(-) (limited to 'plugins/KeyboardNotify/src') diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp index d1d9edfbd4..c56d3b6742 100644 --- a/plugins/KeyboardNotify/src/flash.cpp +++ b/plugins/KeyboardNotify/src/flash.cpp @@ -22,7 +22,7 @@ struct FLASHING_SEQUENCE { unsigned int size; unsigned int index; - BYTE frame[MAX_PATH]; + uint8_t frame[MAX_PATH]; }; @@ -34,19 +34,19 @@ void updateTrillianSeq(void); static void __cdecl TestThread(void *param); static void PreviewThread(void *); FLASHING_SEQUENCE str2FS(wchar_t *); -BYTE KbdChar2Byte(char); +uint8_t KbdChar2Byte(char); void countUnopenEvents(int *, int *, int *); -#define Leds2Flash ((BYTE)(bFlashLed[2] + (bFlashLed[0]<<1) + (bFlashLed[1]<<2))) +#define Leds2Flash ((uint8_t)(bFlashLed[2] + (bFlashLed[0]<<1) + (bFlashLed[1]<<2))) // Flashing settings FLASHING_SEQUENCE *pFS; BOOL bTemporarilyUseExtern; -extern BYTE bFlashLed[3]; -extern BYTE bFlashEffect; extern BYTE bSequenceOrder; +extern uint8_t bFlashLed[3]; +extern uint8_t bFlashEffect; extern uint8_t bSequenceOrder; extern WORD wCustomTheme; -extern BYTE bTrillianLedsMsg, bTrillianLedsFile, bTrillianLedsOther; -extern BYTE bEmulateKeypresses; +extern uint8_t bTrillianLedsMsg, bTrillianLedsFile, bTrillianLedsOther; +extern uint8_t bEmulateKeypresses; // TestThread/PreviewThread globals extern int nWaitDelay; extern WORD wStartDelay; @@ -57,13 +57,13 @@ void RestoreLEDState(void) if (bEmulateKeypresses) keypresses_RestoreLEDState(); else - ToggleKeyboardLights((BYTE)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2))); + ToggleKeyboardLights((uint8_t)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2))); } -BYTE getBlinkingLeds(void) +uint8_t getBlinkingLeds(void) { if (!pFS->size) - return (BYTE)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2)); + return (uint8_t)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2)); pFS->index %= pFS->size; if (bFlashEffect == FLASH_TRILLIAN && !bTemporarilyUseExtern && !pFS->index) @@ -342,11 +342,11 @@ static void PreviewThread(void*) if (wStartDelay > 0) Sleep(wStartDelay * 1000); - BYTE unchangedLeds = (BYTE)(LedState(VK_SCROLL) * !bFlashLed[2] + ((LedState(VK_NUMLOCK) * !bFlashLed[0])<<1) + ((LedState(VK_CAPITAL) * !bFlashLed[1])<<2)); + uint8_t unchangedLeds = (uint8_t)(LedState(VK_SCROLL) * !bFlashLed[2] + ((LedState(VK_NUMLOCK) * !bFlashLed[0])<<1) + ((LedState(VK_CAPITAL) * !bFlashLed[1])<<2)); while (bPreview) for (unsigned i=0; bPreview && i < pFS->size; i++) { - ToggleKeyboardLights((BYTE)(pFS->frame[i%pFS->size]|unchangedLeds)); + ToggleKeyboardLights((uint8_t)(pFS->frame[i%pFS->size]|unchangedLeds)); Sleep(nWaitDelay); } @@ -375,7 +375,7 @@ FLASHING_SEQUENCE str2FS(wchar_t *str) } -BYTE KbdChar2Byte(char kbdChar) +uint8_t KbdChar2Byte(char kbdChar) { switch (kbdChar) { case '1': //NumLock diff --git a/plugins/KeyboardNotify/src/flash.h b/plugins/KeyboardNotify/src/flash.h index ee553f6834..1257ea1c7e 100644 --- a/plugins/KeyboardNotify/src/flash.h +++ b/plugins/KeyboardNotify/src/flash.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once void RestoreLEDState(void); -BYTE getBlinkingLeds(void); +uint8_t getBlinkingLeds(void); void setFlashingSequence(void); void useExternSequence(wchar_t *); wchar_t *normalizeCustomString(wchar_t *); @@ -27,4 +27,4 @@ wchar_t *getCurrentSequenceString(void); void testSequence(wchar_t *); void previewFlashing(BOOL); -#define LedState(a) (((BYTE)(GetKeyState(a) & 0xffff))!=0) +#define LedState(a) (((uint8_t)(GetKeyState(a) & 0xffff))!=0) diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp index d8ea3dbfff..a0161cd342 100644 --- a/plugins/KeyboardNotify/src/keyboard.cpp +++ b/plugins/KeyboardNotify/src/keyboard.cpp @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" // Globals -extern BYTE bEmulateKeypresses; +extern uint8_t bEmulateKeypresses; HANDLE hKbdDev[10] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}; // Defines @@ -52,7 +52,7 @@ BOOL OpenKeyboardDevice() return hKbdDev[0] != INVALID_HANDLE_VALUE; } -BOOL ToggleKeyboardLights(BYTE byte) +BOOL ToggleKeyboardLights(uint8_t byte) { int i; BOOL result = FALSE; KEYBOARD_INDICATOR_PARAMETERS InputBuffer; // Input buffer for DeviceIoControl diff --git a/plugins/KeyboardNotify/src/keyboard.h b/plugins/KeyboardNotify/src/keyboard.h index 2e1ae08e51..f7a759dbd5 100644 --- a/plugins/KeyboardNotify/src/keyboard.h +++ b/plugins/KeyboardNotify/src/keyboard.h @@ -19,5 +19,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once BOOL OpenKeyboardDevice(void); -BOOL ToggleKeyboardLights(BYTE); +BOOL ToggleKeyboardLights(uint8_t); void CloseKeyboardDevice(void); diff --git a/plugins/KeyboardNotify/src/keypresses.cpp b/plugins/KeyboardNotify/src/keypresses.cpp index 8b449f104b..85e521925e 100644 --- a/plugins/KeyboardNotify/src/keypresses.cpp +++ b/plugins/KeyboardNotify/src/keypresses.cpp @@ -19,11 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" // Prototypes -void SetLock(WORD, BYTE, unsigned int *, INPUT *); +void SetLock(WORD, uint8_t, unsigned int *, INPUT *); // Globals BOOL LEDstateSaved = FALSE; -BYTE LEDstate; +uint8_t LEDstate; void keypresses_RestoreLEDState(void) @@ -33,27 +33,27 @@ void keypresses_RestoreLEDState(void) LEDstateSaved = FALSE; } -BOOL keypresses_ToggleKeyboardLights(BYTE byte) +BOOL keypresses_ToggleKeyboardLights(uint8_t byte) { unsigned int n = 0; INPUT keystrokes[6] = {0}; if (!LEDstateSaved) { - LEDstate = (BYTE)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2)); + LEDstate = (uint8_t)(LedState(VK_SCROLL) + (LedState(VK_NUMLOCK)<<1) + (LedState(VK_CAPITAL)<<2)); LEDstateSaved = TRUE; } - SetLock(VK_NUMLOCK, (BYTE)(byte&2), &n, keystrokes); - SetLock(VK_CAPITAL, (BYTE)(byte&4), &n, keystrokes); - SetLock(VK_SCROLL, (BYTE)(byte&1), &n, keystrokes); + SetLock(VK_NUMLOCK, (uint8_t)(byte&2), &n, keystrokes); + SetLock(VK_CAPITAL, (uint8_t)(byte&4), &n, keystrokes); + SetLock(VK_SCROLL, (uint8_t)(byte&1), &n, keystrokes); SendInput(n, keystrokes, sizeof(INPUT)); return TRUE; } -void SetLock(WORD keyCode, BYTE value, unsigned int *n, INPUT *keystrokes) +void SetLock(WORD keyCode, uint8_t value, unsigned int *n, INPUT *keystrokes) { - BYTE status; + uint8_t status; GetAsyncKeyState(keyCode); status = GetKeyState(keyCode) & 1; diff --git a/plugins/KeyboardNotify/src/keypresses.h b/plugins/KeyboardNotify/src/keypresses.h index 8b9d40c375..1330738837 100644 --- a/plugins/KeyboardNotify/src/keypresses.h +++ b/plugins/KeyboardNotify/src/keypresses.h @@ -19,4 +19,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once void keypresses_RestoreLEDState(void); -BOOL keypresses_ToggleKeyboardLights(BYTE); +BOOL keypresses_ToggleKeyboardLights(uint8_t); diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 322ba0ec93..88a31dbdde 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -40,39 +40,39 @@ UINT hReminderTimer = 0; HHOOK hMouseHook = nullptr; HHOOK hKeyBoardHook = nullptr; -BYTE bEmulateKeypresses = 0; +uint8_t bEmulateKeypresses = 0; DWORD dwLastInput = 0; POINT lastGlobalMousePos = { 0, 0 }; -BYTE bFlashOnMsg; -BYTE bFlashOnFile; -BYTE bFlashOnGC; -BYTE bFlashOnOther; -BYTE bFullScreenMode; -BYTE bScreenSaverRunning; -BYTE bWorkstationLocked; -BYTE bProcessesAreRunning; -BYTE bWorkstationActive; -BYTE bFlashIfMsgOpen; -BYTE bFlashIfMsgWinNotTop; -BYTE bFlashIfMsgOlder; +uint8_t bFlashOnMsg; +uint8_t bFlashOnFile; +uint8_t bFlashOnGC; +uint8_t bFlashOnOther; +uint8_t bFullScreenMode; +uint8_t bScreenSaverRunning; +uint8_t bWorkstationLocked; +uint8_t bProcessesAreRunning; +uint8_t bWorkstationActive; +uint8_t bFlashIfMsgOpen; +uint8_t bFlashIfMsgWinNotTop; +uint8_t bFlashIfMsgOlder; WORD wSecondsOlder; -BYTE bFlashUntil; +uint8_t bFlashUntil; WORD wBlinksNumber; -BYTE bMirandaOrWindows; +uint8_t bMirandaOrWindows; WORD wStatusMap; WORD wReminderCheck; -BYTE bFlashLed[3]; -BYTE bFlashEffect; -BYTE bSequenceOrder; +uint8_t bFlashLed[3]; +uint8_t bFlashEffect; +uint8_t bSequenceOrder; WORD wCustomTheme; WORD wStartDelay; -BYTE bFlashSpeed; -BYTE bOverride; -BYTE bTrillianLedsMsg; -BYTE bTrillianLedsURL; -BYTE bTrillianLedsFile; -BYTE bTrillianLedsOther; +uint8_t bFlashSpeed; +uint8_t bOverride; +uint8_t bTrillianLedsMsg; +uint8_t bTrillianLedsURL; +uint8_t bTrillianLedsFile; +uint8_t bTrillianLedsOther; PROTOCOL_LIST ProtoList = { 0, nullptr }; PROCESS_LIST ProcessList = { 0, nullptr }; @@ -82,7 +82,7 @@ unsigned int nExternCount = 0; BOOL bFlashingEnabled = TRUE; BOOL bReminderDisabled = FALSE; -BYTE bMetaProtoEnabled = 0; +uint8_t bMetaProtoEnabled = 0; ///////////////////////////////////////////////////////////////////////////////////////// @@ -263,13 +263,13 @@ static void __cdecl FlashThreadFunction(void*) { BOOL bEvent = FALSE; DWORD dwEventStarted = 0, dwFlashStarted = 0; - BYTE data, unchangedLeds; + uint8_t data, unchangedLeds; Thread_SetName("KeyboardNotify: FlashThreadFunction"); MThreadLock threadLock(hThread); while (true) { - unchangedLeds = (BYTE)(LedState(VK_PAUSE) * !bFlashLed[2] + ((LedState(VK_NUMLOCK) * !bFlashLed[0]) << 1) + ((LedState(VK_CAPITAL) * !bFlashLed[1]) << 2)); + unchangedLeds = (uint8_t)(LedState(VK_PAUSE) * !bFlashLed[2] + ((LedState(VK_NUMLOCK) * !bFlashLed[0]) << 1) + ((LedState(VK_CAPITAL) * !bFlashLed[1]) << 2)); GetAsyncKeyState(VK_PAUSE); // empty Pause/Break's keystroke buffer // Start flashing @@ -295,7 +295,7 @@ static void __cdecl FlashThreadFunction(void*) break; data = getBlinkingLeds(); - ToggleKeyboardLights((BYTE)(data | unchangedLeds)); + ToggleKeyboardLights((uint8_t)(data | unchangedLeds)); // Wait for exit event if (WaitForSingleObject(hExitEvent, nWaitDelay) == WAIT_OBJECT_0) { diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index b7d0cf23c9..91439d716a 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void LoadSettings(void); -extern BYTE +extern uint8_t bFlashOnMsg, bFlashOnFile, bFlashOnGC, bFlashOnOther, bFullScreenMode, bScreenSaverRunning, bWorkstationLocked, bProcessesAreRunning, bWorkstationActive, bFlashIfMsgOpen, bFlashIfMsgOlder, bFlashUntil, bMirandaOrWindows, bFlashLed[3], bFlashEffect, bSequenceOrder, bFlashSpeed, bEmulateKeypresses, bOverride, bFlashIfMsgWinNotTop, bTrillianLedsMsg, bTrillianLedsURL, bTrillianLedsFile, bTrillianLedsOther; @@ -39,7 +39,7 @@ wchar_t *OrderName[] = { LPGENW("left -> right"), LPGENW("right -> left"), LPGEN PROCESS_LIST ProcessListAux; XSTATUS_INFO *XstatusListAux; -BYTE trillianLedsMsg, trillianLedsURL, trillianLedsFile, trillianLedsOther; +uint8_t trillianLedsMsg, trillianLedsURL, trillianLedsFile, trillianLedsOther; static void writeThemeToCombo(const wchar_t *theme, const wchar_t *custom, BOOL overrideExisting) { @@ -543,7 +543,7 @@ static INT_PTR CALLBACK DlgProcProtoOptions(HWND hwndDlg, UINT msg, WPARAM, LPAR for (int i = 0; i < ListView_GetItemCount(hList); i++) { lvItem.iItem = i; ListView_GetItem(hList, &lvItem); - g_plugin.setByte((char *)lvItem.lParam, (BYTE)ListView_GetCheckState(hList, lvItem.iItem)); + g_plugin.setByte((char *)lvItem.lParam, (uint8_t)ListView_GetCheckState(hList, lvItem.iItem)); } } @@ -731,27 +731,27 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara case WM_NOTIFY: { - BYTE untilMap = 0; + uint8_t untilMap = 0; WORD statusMap = 0; //Here we have pressed either the OK or the APPLY button. switch (((LPNMHDR)lParam)->idFrom) { case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - g_plugin.setByte("onmsg", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONMESSAGE) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("ongcmsg", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_GCMSG) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("onfile", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONFILE) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("onother", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONOTHER) == BST_CHECKED ? 1 : 0)); - - g_plugin.setByte("fscreenmode", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_FSCREEN) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("ssaverrunning", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SSAVER) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("wstationlocked", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_LOCKED) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("procsrunning", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_PGMS) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("wstationactive", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ACTIVE) == BST_CHECKED ? 1 : 0)); - - g_plugin.setByte("ifmsgopen", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IFOPEN) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("ifmsgnottop", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IFNOTTOP) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("ifmsgolder", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IFOLDER) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("onmsg", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_ONMESSAGE) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("ongcmsg", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_GCMSG) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("onfile", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_ONFILE) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("onother", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_ONOTHER) == BST_CHECKED ? 1 : 0)); + + g_plugin.setByte("fscreenmode", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_FSCREEN) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("ssaverrunning", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_SSAVER) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("wstationlocked", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_LOCKED) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("procsrunning", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_PGMS) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("wstationactive", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_ACTIVE) == BST_CHECKED ? 1 : 0)); + + g_plugin.setByte("ifmsgopen", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOPEN) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("ifmsgnottop", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFNOTTOP) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("ifmsgolder", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOLDER) == BST_CHECKED ? 1 : 0)); g_plugin.setWord("secsolder", (WORD)SendDlgItemMessage(hwndDlg, IDC_OLDERSPIN, UDM_GETPOS, 0, 0)); if (IsDlgButtonChecked(hwndDlg, IDC_UNTILBLK) == BST_CHECKED) @@ -764,7 +764,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara untilMap |= UNTIL_CONDITIONS; g_plugin.setByte("funtil", untilMap); g_plugin.setWord("nblinks", (WORD)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0)); - g_plugin.setByte("mirorwin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETCURSEL, 0, 0), 0)); + g_plugin.setByte("mirorwin", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETCURSEL, 0, 0), 0)); if (IsDlgButtonChecked(hwndDlg, IDC_ONLINE) == BST_CHECKED) statusMap |= MAP_ONLINE; @@ -796,7 +796,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara if (XstatusListAux) for (i = 0; i < ProtoList.protoCount; i++) for (int j = 0; j < (int)XstatusListAux[i].count; j++) - g_plugin.setByte(fmtDBSettingName("%sxstatus%d", ProtoList.protoInfo[i].szProto, j), (BYTE)XstatusListAux[i].enabled[j]); + g_plugin.setByte(fmtDBSettingName("%sxstatus%d", ProtoList.protoInfo[i].szProto, j), (uint8_t)XstatusListAux[i].enabled[j]); LoadSettings(); return TRUE; @@ -924,9 +924,9 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - g_plugin.setByte("fnum", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NUM) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("fcaps", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CAPS) == BST_CHECKED ? 1 : 0)); - g_plugin.setByte("fscroll", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SCROLL) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("fnum", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_NUM) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("fcaps", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CAPS) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("fscroll", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_SCROLL) == BST_CHECKED ? 1 : 0)); if (IsDlgButtonChecked(hwndDlg, IDC_INTURN) == BST_CHECKED) g_plugin.setByte("feffect", FLASH_INTURN); @@ -938,7 +938,7 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar g_plugin.setByte("feffect", FLASH_TRILLIAN); else g_plugin.setByte("feffect", FLASH_SAMETIME); - g_plugin.setByte("order", (BYTE)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETCURSEL, 0, 0), 0)); + g_plugin.setByte("order", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETCURSEL, 0, 0), 0)); g_plugin.setWord("custom", (WORD)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETCURSEL, 0, 0), 0)); g_plugin.setByte("ledsmsg", trillianLedsMsg); @@ -948,9 +948,9 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar g_plugin.setWord("sdelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_DELAYSPIN, UDM_GETPOS, 0, 0)); - g_plugin.setByte("speed", (BYTE)SendDlgItemMessage(hwndDlg, IDC_SPEED, TBM_GETPOS, 0, 0)); + g_plugin.setByte("speed", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SPEED, TBM_GETPOS, 0, 0)); - g_plugin.setByte("keypresses", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_KEYPRESSES) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("keypresses", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_KEYPRESSES) == BST_CHECKED ? 1 : 0)); LoadSettings(); @@ -1242,7 +1242,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara // Still updating here the the Flashing tab's controls SendDlgItemMessage(hwndEffect, IDC_SCUSTOM, CB_SETCURSEL, (WPARAM)wCustomTheme, 0); - g_plugin.setByte("override", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE) == BST_CHECKED ? 1 : 0)); + g_plugin.setByte("override", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE) == BST_CHECKED ? 1 : 0)); return TRUE; } // switch code -- cgit v1.2.3