mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Fix Android warnings missed due to Android.mk misconfiguration.
git-svn-id: https://svn.eduke32.com/eduke32@5679 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fdf4f2d74b
commit
bd6c92926e
5 changed files with 41 additions and 7 deletions
|
@ -296,8 +296,6 @@ void wm_setapptitle(const char *name)
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
static void attach_debugger_here(void) {}
|
|
||||||
|
|
||||||
/* XXX: libexecinfo could be used on systems without gnu libc. */
|
/* XXX: libexecinfo could be used on systems without gnu libc. */
|
||||||
#if !defined _WIN32 && defined __GNUC__ && !defined __OpenBSD__ && !(defined __APPLE__ && defined __BIG_ENDIAN__) && !defined GEKKO && !defined EDUKE32_TOUCH_DEVICES && !defined __OPENDINGUX__
|
#if !defined _WIN32 && defined __GNUC__ && !defined __OpenBSD__ && !(defined __APPLE__ && defined __BIG_ENDIAN__) && !defined GEKKO && !defined EDUKE32_TOUCH_DEVICES && !defined __OPENDINGUX__
|
||||||
# define PRINTSTACKONSEGV 1
|
# define PRINTSTACKONSEGV 1
|
||||||
|
@ -306,6 +304,9 @@ static void attach_debugger_here(void) {}
|
||||||
|
|
||||||
static inline char grabmouse_low(char a);
|
static inline char grabmouse_low(char a);
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
|
static void attach_debugger_here(void) {}
|
||||||
|
|
||||||
static void sighandler(int signum)
|
static void sighandler(int signum)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(signum);
|
UNREFERENCED_PARAMETER(signum);
|
||||||
|
@ -329,6 +330,7 @@ static void sighandler(int signum)
|
||||||
Bexit(8);
|
Bexit(8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
int mobile_halted = 0;
|
int mobile_halted = 0;
|
||||||
|
@ -371,6 +373,8 @@ int sdlayer_mobilefilter(void *userdata, SDL_Event *event)
|
||||||
default:
|
default:
|
||||||
return 1;//!halt;
|
return 1;//!halt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(userdata);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@ extern "C" {
|
||||||
#include "in_android.h"
|
#include "in_android.h"
|
||||||
#include "function.h"
|
#include "function.h"
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_FADE_FRAMES 10
|
#define DEFAULT_FADE_FRAMES 10
|
||||||
|
|
||||||
#ifndef LOGI
|
#ifndef LOGI
|
||||||
|
@ -624,7 +629,7 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_i(JNIEnv *env, jobject thiz,
|
||||||
for (int i = 0; i < argCount; i++)
|
for (int i = 0; i < argCount; i++)
|
||||||
{
|
{
|
||||||
jstring string = (jstring)(env)->GetObjectArrayElement(argsArray, i);
|
jstring string = (jstring)(env)->GetObjectArrayElement(argsArray, i);
|
||||||
argv[argc] = (char *)(env)->GetStringUTFChars(string, 0);
|
argv[argc] = (char const *)(env)->GetStringUTFChars(string, 0);
|
||||||
LOGI("arg = %s", argv[argc]);
|
LOGI("arg = %s", argv[argc]);
|
||||||
argc++;
|
argc++;
|
||||||
}
|
}
|
||||||
|
@ -641,7 +646,9 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_i(JNIEnv *env, jobject thiz,
|
||||||
AndroidTouchInit(droidinfo.screen_width, droidinfo.screen_height, "/assets/");
|
AndroidTouchInit(droidinfo.screen_width, droidinfo.screen_height, "/assets/");
|
||||||
else LOGI("skipping touch input");
|
else LOGI("skipping touch input");
|
||||||
|
|
||||||
main(argc, (char **)argv);
|
extern int SDL_main(int argc, char const *argv[]);
|
||||||
|
|
||||||
|
SDL_main(argc, (char const **)argv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -737,6 +744,8 @@ jint EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_qc(JNIEnv *env, jobject obj,
|
||||||
quickCommandString = std::string(p) + "\n";
|
quickCommandString = std::string(p) + "\n";
|
||||||
env->ReleaseStringUTFChars(command, p);
|
env->ReleaseStringUTFChars(command, p);
|
||||||
AndroidOSD(quickCommandString.c_str());
|
AndroidOSD(quickCommandString.c_str());
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_sss(JNIEnv *env, jobject thiz, jint width, jint height)
|
void EXPORT_ME Java_com_voidpoint_duke3d_NativeLib_sss(JNIEnv *env, jobject thiz, jint width, jint height)
|
||||||
|
@ -755,4 +764,8 @@ void EXPORT_ME Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv *env, jclass cl
|
||||||
// SDL_EventState(SDL_TEXTINPUT,SDL_ENABLE);
|
// SDL_EventState(SDL_TEXTINPUT,SDL_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,13 +55,18 @@ extern int SDL_SendMouseButton(SDL_Window * window, Uint32 mouseID, Uint8 state,
|
||||||
#include "in_android.h"
|
#include "in_android.h"
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO,"DUKE", __VA_ARGS__))
|
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO,"DUKE", __VA_ARGS__))
|
||||||
|
|
||||||
static char sdl_text[2];
|
static char sdl_text[2];
|
||||||
|
|
||||||
droidinput_t droidinput;
|
droidinput_t droidinput;
|
||||||
|
|
||||||
int AndroidTimer(int tics) { G_InitTimer(tics); }
|
void AndroidTimer(int tics) { G_InitTimer(tics); }
|
||||||
|
|
||||||
int AndroidKeyEvent(int state, int code,int unicode)
|
int AndroidKeyEvent(int state, int code,int unicode)
|
||||||
{
|
{
|
||||||
|
@ -344,4 +349,6 @@ void CONTROL_Android_PollDevices(ControlInfo *info)
|
||||||
//LOGI("poll state = 0x%016llX",CONTROL_ButtonState);
|
//LOGI("poll state = 0x%016llX",CONTROL_ButtonState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
|
@ -97,7 +97,7 @@ typedef struct
|
||||||
extern droidinput_t droidinput;
|
extern droidinput_t droidinput;
|
||||||
extern droidsysinfo_t droidinfo;
|
extern droidsysinfo_t droidinfo;
|
||||||
|
|
||||||
int AndroidTimer(int tics);
|
void AndroidTimer(int tics);
|
||||||
int AndroidKeyEvent(int state, int code, int unicode);
|
int AndroidKeyEvent(int state, int code, int unicode);
|
||||||
int AndroidRead(portableread_t r);
|
int AndroidRead(portableread_t r);
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,13 @@ CONTROL_JoyAxes[MAXJOYAXES];
|
||||||
static controlaxistype CONTROL_LastMouseAxes[MAXMOUSEAXES],
|
static controlaxistype CONTROL_LastMouseAxes[MAXMOUSEAXES],
|
||||||
CONTROL_LastJoyAxes[MAXJOYAXES];
|
CONTROL_LastJoyAxes[MAXJOYAXES];
|
||||||
static int32_t CONTROL_MouseAxesScale[MAXMOUSEAXES], CONTROL_JoyAxesScale[MAXJOYAXES];
|
static int32_t CONTROL_MouseAxesScale[MAXMOUSEAXES], CONTROL_JoyAxesScale[MAXJOYAXES];
|
||||||
|
#ifndef __ANDROID__
|
||||||
static int32_t CONTROL_MouseButtonState[MAXMOUSEBUTTONS], CONTROL_JoyButtonState[MAXJOYBUTTONS];
|
static int32_t CONTROL_MouseButtonState[MAXMOUSEBUTTONS], CONTROL_JoyButtonState[MAXJOYBUTTONS];
|
||||||
static int32_t CONTROL_MouseButtonClickedTime[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedTime[MAXJOYBUTTONS];
|
static int32_t CONTROL_MouseButtonClickedTime[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedTime[MAXJOYBUTTONS];
|
||||||
static int32_t CONTROL_MouseButtonClickedState[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedState[MAXJOYBUTTONS];
|
static int32_t CONTROL_MouseButtonClickedState[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedState[MAXJOYBUTTONS];
|
||||||
static int32_t CONTROL_MouseButtonClicked[MAXMOUSEBUTTONS], CONTROL_JoyButtonClicked[MAXJOYBUTTONS];
|
static int32_t CONTROL_MouseButtonClicked[MAXMOUSEBUTTONS], CONTROL_JoyButtonClicked[MAXJOYBUTTONS];
|
||||||
static uint8_t CONTROL_MouseButtonClickedCount[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedCount[MAXJOYBUTTONS];
|
static uint8_t CONTROL_MouseButtonClickedCount[MAXMOUSEBUTTONS], CONTROL_JoyButtonClickedCount[MAXJOYBUTTONS];
|
||||||
|
#endif
|
||||||
static int32_t(*ExtGetTime)(void);
|
static int32_t(*ExtGetTime)(void);
|
||||||
int32_t CONTROL_Started = FALSE;
|
int32_t CONTROL_Started = FALSE;
|
||||||
//static int32_t ticrate;
|
//static int32_t ticrate;
|
||||||
|
@ -94,6 +96,7 @@ void CONTROL_FreeMouseBind(int32_t i)
|
||||||
BIND(CONTROL_MouseBinds[i], NULL, 0, NULL);
|
BIND(CONTROL_MouseBinds[i], NULL, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
static void CONTROL_GetMouseDelta(void)
|
static void CONTROL_GetMouseDelta(void)
|
||||||
{
|
{
|
||||||
int32_t x,y;
|
int32_t x,y;
|
||||||
|
@ -114,6 +117,7 @@ static void CONTROL_GetMouseDelta(void)
|
||||||
CONTROL_MouseAxes[0].analog = (int32_t)(x * 4.0f * CONTROL_MouseSensitivity);
|
CONTROL_MouseAxes[0].analog = (int32_t)(x * 4.0f * CONTROL_MouseSensitivity);
|
||||||
CONTROL_MouseAxes[1].analog = (int32_t)((y * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
CONTROL_MouseAxes[1].analog = (int32_t)((y * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int32_t CONTROL_GetTime(void)
|
static int32_t CONTROL_GetTime(void)
|
||||||
{
|
{
|
||||||
|
@ -122,6 +126,7 @@ static int32_t CONTROL_GetTime(void)
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
static void CONTROL_SetFlag(int32_t which, int32_t active)
|
static void CONTROL_SetFlag(int32_t which, int32_t active)
|
||||||
{
|
{
|
||||||
if (CONTROL_CheckRange(which)) return;
|
if (CONTROL_CheckRange(which)) return;
|
||||||
|
@ -141,6 +146,7 @@ static void CONTROL_SetFlag(int32_t which, int32_t active)
|
||||||
CONTROL_Flags[which].active = (CONTROL_Flags[which].active ? FALSE : TRUE);
|
CONTROL_Flags[which].active = (CONTROL_Flags[which].active ? FALSE : TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
int32_t CONTROL_KeyboardFunctionPressed(int32_t which)
|
int32_t CONTROL_KeyboardFunctionPressed(int32_t which)
|
||||||
|
@ -429,6 +435,7 @@ void CONTROL_ClearAssignments(void)
|
||||||
CONTROL_JoyAxesScale[i] = NORMALAXISSCALE;
|
CONTROL_JoyAxesScale[i] = NORMALAXISSCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
static void DoGetDeviceButtons(
|
static void DoGetDeviceButtons(
|
||||||
int32_t buttons, int32_t tm,
|
int32_t buttons, int32_t tm,
|
||||||
int32_t NumButtons,
|
int32_t NumButtons,
|
||||||
|
@ -742,6 +749,7 @@ static void CONTROL_ButtonFunctionState(int32_t *p1)
|
||||||
while (i--);
|
while (i--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CONTROL_ClearButton(int32_t whichbutton)
|
void CONTROL_ClearButton(int32_t whichbutton)
|
||||||
{
|
{
|
||||||
|
@ -775,6 +783,7 @@ void CONTROL_ProcessBinds(void)
|
||||||
while (i--);
|
while (i--);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
static void CONTROL_GetFunctionInput(void)
|
static void CONTROL_GetFunctionInput(void)
|
||||||
{
|
{
|
||||||
int32_t periphs[CONTROL_NUM_FLAGS];
|
int32_t periphs[CONTROL_NUM_FLAGS];
|
||||||
|
@ -798,6 +807,7 @@ static void CONTROL_GetFunctionInput(void)
|
||||||
|
|
||||||
memset(CONTROL_OSDInput, 0, sizeof(CONTROL_OSDInput));
|
memset(CONTROL_OSDInput, 0, sizeof(CONTROL_OSDInput));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CONTROL_GetInput(ControlInfo *info)
|
void CONTROL_GetInput(ControlInfo *info)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue