Global: Cleanup initialization/pointer checks.

Cleaning up a lot of cases of uninitialized data, unchecked return values
for failures, and similar.
This commit is contained in:
Unknown W. Brackets
2022-12-10 21:09:50 -08:00
parent a7b7bf7826
commit 9cfcbc46e6
41 changed files with 190 additions and 138 deletions
+6 -9
View File
@@ -15,15 +15,12 @@
#include "Windows/MainWindow.h"
TouchInputHandler::TouchInputHandler() {
touchInfo = (getTouchInputProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"GetTouchInputInfo");
closeTouch = (closeTouchInputProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"CloseTouchInputHandle");
registerTouch = (registerTouchProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"RegisterTouchWindow");
HMODULE user32 = GetModuleHandle(TEXT("User32.dll"));
if (!user32)
return;
touchInfo = (getTouchInputProc)GetProcAddress(user32, "GetTouchInputInfo");
closeTouch = (closeTouchInputProc)GetProcAddress(user32, "CloseTouchInputHandle");
registerTouch = (registerTouchProc)GetProcAddress(user32, "RegisterTouchWindow");
}
int TouchInputHandler::ToTouchID(int windowsID, bool allowAllocate) {