Fixed Keyboard input for WebGL
This commit is contained in:
@@ -4349,11 +4349,7 @@ void rcbasic_test()
|
||||
SDL_DestroyWindow(win);
|
||||
}
|
||||
|
||||
#ifdef RC_ANDROID
|
||||
void android_main( android_app* application )
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
//rcbasic_test();
|
||||
@@ -4487,4 +4483,3 @@ int main(int argc, char * argv[])
|
||||
//cout << "Hello world!" << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -218,6 +218,7 @@ bool rc_gfx_init()
|
||||
}
|
||||
}
|
||||
SDL_SetHint("SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS", "1");
|
||||
SDL_SetHint("SDL_HINT_EMSCRIPTEN_ASYNCIFY", "1");
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1836,6 +1837,7 @@ int rc_inKey()
|
||||
|
||||
int rc_key(int check_Key)
|
||||
{
|
||||
keyState = SDL_GetKeyboardState(NULL);
|
||||
return keyState[SDL_GetScancodeFromKey(check_Key)];
|
||||
}
|
||||
|
||||
@@ -3372,7 +3374,7 @@ bool rc_update()
|
||||
irrevent.UserEvent.UserData1 = reinterpret_cast<uintptr_t>(SDL_event.user.data1);
|
||||
irrevent.UserEvent.UserData2 = reinterpret_cast<uintptr_t>(SDL_event.user.data2);
|
||||
|
||||
device->postEventFromUser(irrevent);
|
||||
//device->postEventFromUser(irrevent);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3381,6 +3383,7 @@ bool rc_update()
|
||||
|
||||
} // end while
|
||||
|
||||
|
||||
if(!Close)
|
||||
{
|
||||
irrtheora::updateVideo();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
//FOR DEBUG PURPOSES
|
||||
#define RC_DRIVER_GLES2
|
||||
//#define RC_DRIVER_GLES2
|
||||
|
||||
#define RC_PI 3.14159265359
|
||||
|
||||
|
||||
@@ -73,18 +73,31 @@
|
||||
<Unit filename="gui_freetype_font.cpp" />
|
||||
<Unit filename="gui_freetype_font.h" />
|
||||
<Unit filename="main.cpp" />
|
||||
<Unit filename="rc_actor_animation.h" />
|
||||
<Unit filename="rc_actor_material.h" />
|
||||
<Unit filename="rc_actor_physics.h" />
|
||||
<Unit filename="rc_audio.h" />
|
||||
<Unit filename="rc_base_actor.h" />
|
||||
<Unit filename="rc_camera.h" />
|
||||
<Unit filename="rc_constraint.h" />
|
||||
<Unit filename="rc_defines.h" />
|
||||
<Unit filename="rc_font.h" />
|
||||
<Unit filename="rc_func130_cases.h" />
|
||||
<Unit filename="rc_geometry.h" />
|
||||
<Unit filename="rc_gfx.h" />
|
||||
<Unit filename="rc_gfx3D.h" />
|
||||
<Unit filename="rc_gfx_core.h" />
|
||||
<Unit filename="rc_joints.h" />
|
||||
<Unit filename="rc_matrix.h" />
|
||||
<Unit filename="rc_media.h" />
|
||||
<Unit filename="rc_mesh.h" />
|
||||
<Unit filename="rc_net.h" />
|
||||
<Unit filename="rc_os_defines.h" />
|
||||
<Unit filename="rc_particles.h" />
|
||||
<Unit filename="rc_physics3D_base.h" />
|
||||
<Unit filename="rc_scene.h" />
|
||||
<Unit filename="rc_sprite2D.h" />
|
||||
<Unit filename="rc_sprite_physics.h" />
|
||||
<Unit filename="rc_spritelib.h" />
|
||||
<Unit filename="rc_stdlib.h" />
|
||||
<Unit filename="rc_test.h" />
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<irrtheora.h>
|
||||
"rc_func130_cases.h"
|
||||
|
||||
1731277893 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
1731347776 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
|
||||
1730315467 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
|
||||
|
||||
@@ -1246,7 +1246,7 @@
|
||||
1727545973 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/RealisticWater.h
|
||||
<irrlicht.h>
|
||||
|
||||
1731277937 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
1731294351 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
"SDL.h"
|
||||
<SDL2/SDL.h>
|
||||
<irrlicht.h>
|
||||
|
||||
Reference in New Issue
Block a user