diff --git a/platform/targets/linux/emulator/emulator.c b/platform/targets/linux/emulator/emulator.c index ae486297..3f9e2e7b 100644 --- a/platform/targets/linux/emulator/emulator.c +++ b/platform/targets/linux/emulator/emulator.c @@ -25,6 +25,8 @@ #include #include +radio_state Radio_State = {12, 7, 3, 4, 1, false}; + void systemBootstrap(); int CLIMenu() { @@ -99,15 +101,11 @@ void *startCLIMenu() { } } while (choice != EXIT); printf("exiting\n"); - SDL_Quit(); - SDL_DestroyWindow(window); exit(0); }; int emulator_main() { - Radio_State = (radio_state){12, 7, 3, 4, 1, false}; - pthread_t gui_thread, cli_thread, radio_thread; int err1, err2; diff --git a/platform/targets/linux/emulator/emulator.h b/platform/targets/linux/emulator/emulator.h index cc498dc5..04c1422a 100644 --- a/platform/targets/linux/emulator/emulator.h +++ b/platform/targets/linux/emulator/emulator.h @@ -17,6 +17,8 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, see * ***************************************************************************/ +#ifndef EMULATOR_H +#define EMULATOR_H #include #include @@ -30,11 +32,6 @@ #define SCREEN_HEIGHT 128 #endif - -SDL_Renderer *renderer; /* SDL renderer */ -SDL_Window *window; /* SDL window */ -SDL_Texture *displayTexture; /* SDL rendering surface */ - enum choices { VAL_RSSI=1, VAL_BAT, @@ -55,4 +52,6 @@ typedef struct { bool PttStatus; } radio_state; -radio_state Radio_State; +extern radio_state Radio_State; + +#endif /* EMULATOR_H */