base: cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user