Simplify code paths for POSIX desktop testing and fix testcpu breakage

This commit is contained in:
Aaron Culliney 2016-07-02 13:35:50 -07:00
parent 4fee1ee0be
commit c393ea81a0
3 changed files with 1 additions and 14 deletions

View File

@ -128,7 +128,6 @@ static void _glnode_initGLUTPost(void) {
glutReshapeFunc(_glnode_reshapeGLUT);
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
#if !TESTING
glutKeyboardFunc(gldriver_on_key_down);
glutKeyboardUpFunc(gldriver_on_key_up);
glutSpecialFunc(gldriver_on_key_special_down);
@ -136,7 +135,6 @@ static void _glnode_initGLUTPost(void) {
//glutMouseFunc(gldriver_mouse);
//glutMotionFunc(gldriver_mouse_drag);
c_joystick_reset();
#endif
}
#endif
@ -255,7 +253,7 @@ static void _init_glnode_manager(void) {
interface_onTouchEvent = &glnode_onTouchEvent;
#endif
#if USE_GLUT
#if USE_GLUT && !TEST_CPU
joydriver_resetJoystick = &_glutJoystickReset;
#endif
}

View File

@ -13,8 +13,6 @@
#include "video/glinput.h"
#include <math.h>
#if !TESTING
//----------------------------------------------------------------------------
//
// keyboard
@ -232,5 +230,3 @@ void _glutJoystickReset(void) {
glutJoystickFunc(gldriver_joystick_callback, (int)JOYSTICK_POLL_INTERVAL_MILLIS);
}
#endif // TESTING

View File

@ -191,7 +191,6 @@ static void getshm(int size) {
}
#endif
#if !TESTING
// Map X keysyms into Apple//ix internal-representation scancodes.
static int keysym_to_scancode(void) {
int rc = XkbKeycodeToKeysym(display, xevent.xkey.keycode, 0, 0);
@ -332,7 +331,6 @@ static int keysym_to_scancode(void) {
assert(rc < 0x80);
return rc;
}
#endif
static void post_image() {
// copy Apple //e video memory into XImage uint32_t buffer
@ -411,11 +409,6 @@ void video_driver_sync(void) {
// also process other input events
post_image();
#if TESTING
// no input processing if test-driven ...
return;
#endif
if (!XPending(display)) {
c_keys_handle_input(/*scancode:*/-1, /*pressed:*/0, 0);
} else {