Skip to content

Commit da0606d

Browse files
committed
NEW COMMAND 2059 - Lock SDL features
1 parent f946f31 commit da0606d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/game_interpreter.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
#include "game_variables.h"
3838
#include "game_party.h"
3939
#include "game_actors.h"
40-
#include <SDL.h> // For SDL_StartTextInput and SDL_StopTextInput
40+
41+
#if defined(USE_SDL)
42+
#include <SDL.h>
43+
#endif
44+
4145
#include "game_strings.h"
4246
#include "game_system.h"
4347
#include "game_message.h"
@@ -5757,6 +5761,8 @@ bool Game_Interpreter::CommandEasyRpgDestroyMapEvent(lcf::rpg::EventCommand cons
57575761
}
57585762

57595763
bool Game_Interpreter::CommandEasyRpgTypeMode(const lcf::rpg::EventCommand& com) {
5764+
#if defined(USE_SDL)
5765+
57605766
int output_var_id = 0;
57615767
if (com.parameters.size() > 1) {
57625768
output_var_id = ValueOrVariable(com.parameters[0], com.parameters[1]);
@@ -5817,6 +5823,10 @@ bool Game_Interpreter::CommandEasyRpgTypeMode(const lcf::rpg::EventCommand& com)
58175823
SDL_StartTextInput();
58185824

58195825
return true;
5826+
#endif
5827+
5828+
Output::Warning("TypeMode: SDL not supported on this platform");
5829+
return true;
58205830
}
58215831

58225832
// --- public methods for UI layer ---
@@ -5861,7 +5871,9 @@ void Game_Interpreter::FinalizeTyping(bool accepted) {
58615871
if (!_is_typing_mode) return;
58625872

58635873
_is_typing_mode = false;
5874+
#if defined(USE_SDL)
58645875
SDL_StopTextInput();
5876+
#endif
58655877

58665878
if (!accepted) {
58675879
if (_typing_output_var_id > 0) {

0 commit comments

Comments
 (0)