Atlas - main_lib.c

Home / ext / SDL / cmake / test Lines: 1 | Size: 718 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1#include <SDL3/SDL.h> 2#define SDL_MAIN_HANDLED /* don't drag in header-only SDL_main implementation */ 3#include <SDL3/SDL_main.h> 4 5#include EXPORT_HEADER 6 7#ifdef _WIN32 8#include <windows.h> 9BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { 10 return TRUE; 11} 12#endif 13 14int MYLIBRARY_EXPORT mylibrary_init(void); 15void MYLIBRARY_EXPORT mylibrary_quit(void); 16int MYLIBRARY_EXPORT mylibrary_work(void); 17 18int mylibrary_init(void) { 19 SDL_SetMainReady(); 20 if (!SDL_Init(0)) { 21 SDL_Log("Could not initialize SDL: %s", SDL_GetError()); 22 return 1; 23 } 24 return 0; 25} 26 27void mylibrary_quit(void) { 28 SDL_Quit(); 29} 30 31int mylibrary_work(void) { 32 SDL_Delay(100); 33 return 0; 34} 35
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.