UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
android_main.cpp
Go to the documentation of this file.
1 
6 /*
7 Copyright (C) 1997-2001 Id Software, Inc.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 */
25 
26 #include <SDL.h>
27 #include <fcntl.h>
28 #include <unistd.h>
29 #include <signal.h>
30 #include <android/log.h>
31 
32 #include "../../common/common.h"
33 #include "../system.h"
34 
35 /* ======================================================================= */
36 /* General routines */
37 /* ======================================================================= */
38 
39 void Sys_Init (void)
40 {
41  sys_os = Cvar_Get("sys_os", "linux", CVAR_SERVERINFO);
42  sys_affinity = Cvar_Get("sys_affinity", "0", CVAR_ARCHIVE);
43  sys_priority = Cvar_Get("sys_priority", "0", CVAR_ARCHIVE, "Process nice level");
44 }
45 
50 int SDL_main (int argc, char **argv)
51 {
53  Qcommon_Init(argc, argv);
54 
55  while (1)
56  Qcommon_Frame();
57 
58  return 0;
59 }
void Qcommon_Frame(void)
This is the function that is called directly from main()
Definition: common.cpp:1493
void Qcommon_Init(int argc, char **argv)
Init function.
Definition: common.cpp:1078
cvar_t * sys_affinity
Definition: common.cpp:60
void Sys_ConsoleInit(void)
Initialize the console input (tty mode if possible)
int SDL_main(int argc, char **argv)
The entry point for Android server and client. Initializes the program and calls Qcommon_Frame in an ...
#define CVAR_ARCHIVE
Definition: cvar.h:40
void Sys_Init(void)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
Definition: cvar.cpp:342
cvar_t * sys_os
Definition: common.cpp:61
cvar_t * sys_priority
Definition: common.cpp:59
#define CVAR_SERVERINFO
Definition: cvar.h:42