5252#include " application.h"
5353#include " ddio.h"
5454#include " mono.h"
55+ #include " ddio_lnx.h"
5556
5657volatile struct tLnxKeys {
5758 union {
@@ -87,29 +88,12 @@ void ddio_sdl_InternalResetKey(uint8_t key);
8788bool ddio_sdl_KeyFrame ();
8889void ddio_sdl_InternalKeyFrame (void );
8990
90- enum {
91- Input_null,
92- Input_sdl // Input_svga,Input_xwin
93- } Keyboard_mode;
94-
9591// ----------------------------------------------------------------------------
9692// Initialization of keyboard device.
9793// ----------------------------------------------------------------------------
9894
9995bool ddio_InternalKeyInit (ddio_init_info *init_info) {
100- oeLnxApplication *app = (oeLnxApplication *)init_info->obj ;
101- tLnxAppInfo app_info;
102-
103- if (!app) {
104- return false ;
105- }
106-
107- app->get_info (&app_info);
108-
109- // determine if we are to use SDL or null mode
110- Keyboard_mode = (app_info.flags & APPFLAG_USESERVICE) ? Input_null : Input_sdl;
111-
112- switch (Keyboard_mode) {
96+ switch (Input_mode) {
11397 case Input_null:
11498 return ddio_null_InternalKeyInit (init_info);
11599 case Input_sdl:
@@ -120,7 +104,7 @@ bool ddio_InternalKeyInit(ddio_init_info *init_info) {
120104}
121105
122106void ddio_InternalKeyClose () {
123- switch (Keyboard_mode ) {
107+ switch (Input_mode ) {
124108 case Input_null:
125109 return ddio_null_InternalKeyClose ();
126110 case Input_sdl:
@@ -129,7 +113,7 @@ void ddio_InternalKeyClose() {
129113}
130114
131115bool ddio_InternalKeyState (uint8_t key) {
132- switch (Keyboard_mode ) {
116+ switch (Input_mode ) {
133117 case Input_null:
134118 return ddio_null_InternalKeyState (key);
135119 case Input_sdl:
@@ -140,7 +124,7 @@ bool ddio_InternalKeyState(uint8_t key) {
140124}
141125
142126void ddio_InternalKeySuspend () {
143- switch (Keyboard_mode ) {
127+ switch (Input_mode ) {
144128 case Input_null:
145129 ddio_null_InternalKeySuspend ();
146130 break ;
@@ -150,7 +134,7 @@ void ddio_InternalKeySuspend() {
150134}
151135
152136void ddio_InternalKeyResume () {
153- switch (Keyboard_mode ) {
137+ switch (Input_mode ) {
154138 case Input_null:
155139 ddio_null_InternalKeyResume ();
156140 break ;
@@ -160,7 +144,7 @@ void ddio_InternalKeyResume() {
160144}
161145
162146float ddio_InternalKeyDownTime (uint8_t key) {
163- switch (Keyboard_mode ) {
147+ switch (Input_mode ) {
164148 case Input_null:
165149 return ddio_null_InternalKeyDownTime (key);
166150 case Input_sdl:
@@ -171,7 +155,7 @@ float ddio_InternalKeyDownTime(uint8_t key) {
171155}
172156
173157void ddio_InternalResetKey (uint8_t key) {
174- switch (Keyboard_mode ) {
158+ switch (Input_mode ) {
175159 case Input_null:
176160 ddio_null_InternalResetKey (key);
177161 break ;
@@ -181,7 +165,7 @@ void ddio_InternalResetKey(uint8_t key) {
181165}
182166
183167bool ddio_KeyFrame () {
184- switch (Keyboard_mode ) {
168+ switch (Input_mode ) {
185169 case Input_sdl:
186170 break ;
187171 case Input_null:
@@ -192,7 +176,7 @@ bool ddio_KeyFrame() {
192176}
193177
194178void ddio_InternalKeyFrame (void ) {
195- switch (Keyboard_mode ) {
179+ switch (Input_mode ) {
196180 case Input_null:
197181 ddio_null_InternalKeyFrame ();
198182 break ;
0 commit comments