diff --git a/base/sources/backends/linux_system.c b/base/sources/backends/linux_system.c index aa602660..e638a78f 100644 --- a/base/sources/backends/linux_system.c +++ b/base/sources/backends/linux_system.c @@ -1204,11 +1204,9 @@ void iron_internal_shutdown() { iron_internal_shutdown_callback(); } -#ifndef IRON_NO_MAIN int main(int argc, char **argv) { return kickstart(argc, argv); } -#endif void iron_copy_to_clipboard(const char *text) { size_t textLength = strlen(text); diff --git a/base/sources/backends/macos_system.m b/base/sources/backends/macos_system.m index 74323490..24660020 100644 --- a/base/sources/backends/macos_system.m +++ b/base/sources/backends/macos_system.m @@ -722,11 +722,9 @@ const char *iron_internal_save_path(void) { return [resolvedPath cStringUsingEncoding:NSUTF8StringEncoding]; } -#ifndef IRON_NO_MAIN int main(int argc, char **argv) { return kickstart(argc, argv); } -#endif @implementation IronApplication diff --git a/base/sources/backends/windows_system.c b/base/sources/backends/windows_system.c index 1edf236c..69bed629 100644 --- a/base/sources/backends/windows_system.c +++ b/base/sources/backends/windows_system.c @@ -18,25 +18,6 @@ void iron_microsoft_format(const char *format, va_list args, wchar_t *buffer) { MultiByteToWideChar(CP_UTF8, 0, cbuffer, -1, buffer, 4096); } -#ifdef IRON_NO_CLIB -#ifndef NDEBUG -void _wassert(wchar_t const *message, wchar_t const *filename, unsigned line) { - __debugbreak(); -} -void _RTC_CheckStackVars(void) {} -void _RTC_InitBase(void) {} -void _RTC_Shutdown(void) {} -void _RTC_AllocaHelper(void) {} -void _RTC_CheckStackVars2(void) {} -void __GSHandlerCheck(void) {} -void __fastcall __security_check_cookie(_In_ uintptr_t _StackCookie) {} -uintptr_t __security_cookie; -int _fltused = 1; -void __report_rangecheckfailure(void) {} -void __chkstk(void) {} -#endif -#endif - #define MAXIMUM_DISPLAYS 8 typedef struct { @@ -891,7 +872,6 @@ double iron_time(void) { return (double)(stamp.QuadPart - startCount.QuadPart) / (double)frequency.QuadPart; } -#if !defined(IRON_NO_MAIN) && !defined(IRON_NO_CLIB) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int ret = kickstart(__argc, __argv); if (ret != 0) { @@ -903,7 +883,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } return ret; } -#endif void iron_init(iron_window_options_t *ops) { initKeyTranslation(); @@ -1447,7 +1426,7 @@ static BOOL IsXInputDevice(const GUID *pGuidProductFromDirectInput) { // If it does, then get the VID/PID from var.bstrVal DWORD dwPid = 0, dwVid = 0; WCHAR *strVid = wcsstr(var.bstrVal, L"VID_"); -#ifndef IRON_NO_CLIB + if (strVid && swscanf(strVid, L"VID_%4X", &dwVid) != 1) { dwVid = 0; } @@ -1455,7 +1434,6 @@ static BOOL IsXInputDevice(const GUID *pGuidProductFromDirectInput) { if (strPid && swscanf(strPid, L"PID_%4X", &dwPid) != 1) { dwPid = 0; } -#endif // Compare the VID/PID to the DInput device DWORD dwVidPid = MAKELONG(dwVid, dwPid); diff --git a/base/sources/libs/stb_image.h b/base/sources/libs/stb_image.h index 1a357d30..e88065b8 100644 --- a/base/sources/libs/stb_image.h +++ b/base/sources/libs/stb_image.h @@ -589,10 +589,8 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; #endif #ifdef _MSC_VER -#ifndef IRON_NO_CLIB #define STBI_HAS_LROTL #endif -#endif #ifdef STBI_HAS_LROTL #define stbi_lrot(x,y) _lrotl(x,y)