diff --git a/developer/dx.sh b/developer/dx.sh index 28c87575..a5f6db7f 100644 --- a/developer/dx.sh +++ b/developer/dx.sh @@ -1,7 +1 @@ -function compiler() { - make RENDER_API=$1 WINDOW_API=$2 AUDIO_API=$3 CONTROLLER_API=$4 -} - -compiler D3D12 DXGI SDL2 SDL2 d3d12_2 - -./build/us_pc/sm64.us.f3dex2e.exe +make RENDER_API=D3D12 WINDOW_API=DXGI BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 && ./build/us_pc/sm64.us.f3dex2e.exe diff --git a/src/pc/djui/djui_inputbox.c b/src/pc/djui/djui_inputbox.c index afb4d680..595d353e 100644 --- a/src/pc/djui/djui_inputbox.c +++ b/src/pc/djui/djui_inputbox.c @@ -307,6 +307,20 @@ static void djui_inputbox_on_text_input(struct DjuiBase *base, char* text) { int msgLen = strlen(msg); int textLen = strlen(text); + // make sure we're not just printing garbage characters + bool containsValidAscii = false; + char* tinput = text; + while (*tinput != NULL) { + if (*tinput >= '!' && *tinput <= '~') { + containsValidAscii = true; + break; + } + tinput++; + } + if (!containsValidAscii) { + return; + } + // truncate if (textLen + msgLen >= inputbox->bufferSize) { int space = (inputbox->bufferSize - msgLen);