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
2ccdb31c
Commit
2ccdb31c
authored
Jan 01, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compiling on Android
parent
56d603e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
SDL_androidevents.c
src/video/android/SDL_androidevents.c
+5
-12
No files found.
src/video/android/SDL_androidevents.c
View file @
2ccdb31c
...
...
@@ -32,20 +32,13 @@
#include "SDL_androidevents.h"
void
Android_InitEvents
(){
SDL_Keyboard
keyboard
;
SDL_zero
(
keyboard
);
SDL_AddKeyboard
(
&
keyboard
,
-
1
);
void
Android_InitEvents
()
{
SDLKey
keymap
[
SDL_NUM_SCANCODES
];
/* Add default scancode to key mapping */
SDL_GetDefaultKeymap
(
keymap
);
SDL_SetKeymap
(
0
,
0
,
keymap
,
SDL_NUM_SCANCODES
);
SDL_SetKeymap
(
0
,
keymap
,
SDL_NUM_SCANCODES
);
}
void
...
...
@@ -74,12 +67,12 @@ void Android_OnResize(int width, int height, int format){
int
Android_OnKeyDown
(
int
keycode
){
return
SDL_SendKeyboardKey
(
0
,
SDL_PRESSED
,
(
SDL_scancode
)
keycode
);
return
SDL_SendKeyboardKey
(
SDL_PRESSED
,
(
SDL_scancode
)
keycode
);
}
int
Android_OnKeyUp
(
int
keycode
){
return
SDL_SendKeyboardKey
(
0
,
SDL_RELEASED
,
(
SDL_scancode
)
keycode
);
return
SDL_SendKeyboardKey
(
SDL_RELEASED
,
(
SDL_scancode
)
keycode
);
}
/* vi: set ts=4 sw=4 expandtab: */
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