Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
f4dd9b94
Commit
f4dd9b94
authored
Feb 16, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow you to override SDL's main override
parent
0a5c049c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
SDL_main.h
include/SDL_main.h
+12
-10
No files found.
include/SDL_main.h
View file @
f4dd9b94
...
@@ -31,10 +31,11 @@
...
@@ -31,10 +31,11 @@
* Redefine main() on some platforms so that it is called by SDL.
* Redefine main() on some platforms so that it is called by SDL.
*/
*/
#if defined(__WIN32__) || \
#if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__)
(defined(__MWERKS__) && !defined(__BEOS__)) || \
#ifndef SDL_MAIN_HANDLED
defined(__SYMBIAN32__) || defined(__IPHONEOS__) || \
#define SDL_MAIN_NEEDED
defined(__ANDROID__)
#endif
#endif
#ifdef __cplusplus
#ifdef __cplusplus
#define C_LINKAGE "C"
#define C_LINKAGE "C"
...
@@ -57,7 +58,9 @@
...
@@ -57,7 +58,9 @@
* \endcode
* \endcode
*/
*/
#ifdef SDL_MAIN_NEEDED
#define main SDL_main
#define main SDL_main
#endif
/**
/**
* The prototype for the application's main() function
* The prototype for the application's main() function
...
@@ -65,9 +68,6 @@
...
@@ -65,9 +68,6 @@
extern
C_LINKAGE
int
SDL_main
(
int
argc
,
char
*
argv
[]);
extern
C_LINKAGE
int
SDL_main
(
int
argc
,
char
*
argv
[]);
/* From the SDL library code -- needed for registering the app on Win32 */
#ifdef __WIN32__
#include "begin_code.h"
#include "begin_code.h"
#ifdef __cplusplus
#ifdef __cplusplus
/* *INDENT-OFF* */
/* *INDENT-OFF* */
...
@@ -75,6 +75,8 @@ extern "C" {
...
@@ -75,6 +75,8 @@ extern "C" {
/* *INDENT-ON* */
/* *INDENT-ON* */
#endif
#endif
#ifdef __WIN32__
/**
/**
* This can be called to set the application class at startup
* This can be called to set the application class at startup
*/
*/
...
@@ -82,15 +84,15 @@ extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
...
@@ -82,15 +84,15 @@ extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
void
*
hInst
);
void
*
hInst
);
extern
DECLSPEC
void
SDLCALL
SDL_UnregisterApp
(
void
);
extern
DECLSPEC
void
SDLCALL
SDL_UnregisterApp
(
void
);
#endif
/* __WIN32__ */
#ifdef __cplusplus
#ifdef __cplusplus
/* *INDENT-OFF* */
/* *INDENT-OFF* */
}
}
/* *INDENT-ON* */
/* *INDENT-ON* */
#endif
#endif
#include "close_code.h"
#include "close_code.h"
#endif
#endif
/* Need to redefine main()? */
#endif
/* _SDL_main_h */
#endif
/* _SDL_main_h */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment