diff --git a/src/Launcher.c b/src/Launcher.c index b61477f7d..45fb1f799 100644 --- a/src/Launcher.c +++ b/src/Launcher.c @@ -298,11 +298,11 @@ void Launcher_Run(void) { /*########################################################################################################################* *---------------------------------------------------------Colours/Skin----------------------------------------------------* *#########################################################################################################################*/ -#define DEFAULT_BACKGROUND_COL BitmapCol_Make(153, 127, 172, 255); -#define DEFAULT_BUTTON_BORDER_COL BitmapCol_Make( 97, 81, 110, 255); -#define DEFAULT_BUTTON_FORE_ACTIVE_COL BitmapCol_Make(189, 168, 206, 255); -#define DEFAULT_BUTTON_FORE_COL BitmapCol_Make(141, 114, 165, 255); -#define DEFAULT_BUTTON_HIGHLIGHT_COL BitmapCol_Make(162, 131, 186, 255); +#define DEFAULT_BACKGROUND_COL BitmapCol_Make(153, 127, 172, 255) +#define DEFAULT_BUTTON_BORDER_COL BitmapCol_Make( 97, 81, 110, 255) +#define DEFAULT_BUTTON_FORE_ACTIVE_COL BitmapCol_Make(189, 168, 206, 255) +#define DEFAULT_BUTTON_FORE_COL BitmapCol_Make(141, 114, 165, 255) +#define DEFAULT_BUTTON_HIGHLIGHT_COL BitmapCol_Make(162, 131, 186, 255) BitmapCol Launcher_BackgroundCol = DEFAULT_BACKGROUND_COL; BitmapCol Launcher_ButtonBorderCol = DEFAULT_BUTTON_BORDER_COL; diff --git a/src/Logger.c b/src/Logger.c index c37512a53..4890bf703 100644 --- a/src/Logger.c +++ b/src/Logger.c @@ -231,10 +231,10 @@ struct SymbolAndName { IMAGEHLP_SYMBOL Symbol; char Name[256]; }; static int Logger_GetFrames(CONTEXT* ctx, cc_uintptr* addrs, int max) { STACKFRAME frame = { 0 }; + DWORD type; frame.AddrPC.Mode = AddrModeFlat; frame.AddrFrame.Mode = AddrModeFlat; frame.AddrStack.Mode = AddrModeFlat; - DWORD type; #if defined _M_IX86 type = IMAGE_FILE_MACHINE_I386; diff --git a/src/Platform.c b/src/Platform.c index 0416cb767..b00923b5c 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -225,9 +225,12 @@ void Platform_Log(const String* message) { #define FILETIME_EPOCH 50491123200000ULL #define FileTime_TotalMS(time) ((time / 10000) + FILETIME_EPOCH) TimeMS DateTime_CurrentUTC_MS(void) { - FILETIME ft; GetSystemTimeAsFileTime(&ft); + FILETIME ft; + cc_uint64 raw; + + GetSystemTimeAsFileTime(&ft); /* in 100 nanosecond units, since Jan 1 1601 */ - cc_uint64 raw = ft.dwLowDateTime | ((cc_uint64)ft.dwHighDateTime << 32); + raw = ft.dwLowDateTime | ((cc_uint64)ft.dwHighDateTime << 32); return FileTime_TotalMS(raw); } @@ -380,6 +383,7 @@ int File_Exists(const String* path) { cc_result Directory_Enum(const String* dirPath, void* obj, Directory_EnumCallback callback) { String path; char pathBuffer[MAX_PATH + 10]; TCHAR str[NATIVE_STR_LEN]; + TCHAR* src; WIN32_FIND_DATA entry; HANDLE find; cc_result res; @@ -398,7 +402,7 @@ cc_result Directory_Enum(const String* dirPath, void* obj, Directory_EnumCallbac String_Format1(&path, "%s/", dirPath); /* ignore . and .. entry */ - TCHAR* src = entry.cFileName; + src = entry.cFileName; if (src[0] == '.' && src[1] == '\0') continue; if (src[0] == '.' && src[1] == '.' && src[2] == '\0') continue; diff --git a/src/Window.c b/src/Window.c index 4f5bcfa1f..d38d253ac 100644 --- a/src/Window.c +++ b/src/Window.c @@ -549,13 +549,14 @@ void Window_Close(void) { } void Window_ProcessEvents(void) { + HWND foreground; MSG msg; while (PeekMessage(&msg, NULL, 0, 0, 1)) { TranslateMessage(&msg); DispatchMessage(&msg); } - HWND foreground = GetForegroundWindow(); + foreground = GetForegroundWindow(); if (foreground) { Window_Focused = foreground == win_handle; }