aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-15 22:36:16 -0500
committercnlohr <lohr85@gmail.com>2016-12-15 22:36:16 -0500
commitc36b220308c08147a6c995fbb6082aa5ab0a0a21 (patch)
treedb989c0378a21848a16b0195fd9f529825affb0f /test.c
parent890a3addcc936229541626e6748fadd142f58a6e (diff)
downloadlibsurvive-c36b220308c08147a6c995fbb6082aa5ab0a0a21.tar.gz
libsurvive-c36b220308c08147a6c995fbb6082aa5ab0a0a21.tar.bz2
Get working plane tester
Diffstat (limited to 'test.c')
-rw-r--r--test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test.c b/test.c
index 5eff185..1f6778a 100644
--- a/test.c
+++ b/test.c
@@ -7,6 +7,7 @@
#include <os_generic.h>
#include <DrawFunctions.h>
+struct SurviveContext * ctx;
void survivefault( struct SurviveContext * ctx, const char * fault )
{
@@ -22,6 +23,16 @@ void survivenote( struct SurviveContext * ctx, const char * fault )
void HandleKey( int keycode, int bDown )
{
+ if( !bDown ) return;
+
+ if( keycode == 'O' || keycode == 'o' )
+ {
+ survive_usb_send_magic(ctx,1);
+ }
+ if( keycode == 'F' || keycode == 'f' )
+ {
+ survive_usb_send_magic(ctx,0);
+ }
}
void HandleButton( int x, int y, int button, int bDown )
@@ -91,7 +102,7 @@ int main()
printf( "%02x ", output[i] );
}
return 0;*/
- struct SurviveContext * ctx = survive_init( &survivefault, &survivenote );
+ ctx = survive_init( &survivefault, &survivenote );
CNFGBGColor = 0x000000;
CNFGDialogColor = 0x444444;