From b607356c8651046a4868ecc0ac177eb03ea1f80d Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sat, 10 Oct 2020 19:39:29 -0400 Subject: [PATCH] Use stderr --- debian/client/usr/bin/minecraft-pi | 2 +- debian/server/usr/bin/minecraft-pi-server | 2 +- mods/src/server/server.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/client/usr/bin/minecraft-pi b/debian/client/usr/bin/minecraft-pi index adf4c5b45..47fb7ef38 100755 --- a/debian/client/usr/bin/minecraft-pi +++ b/debian/client/usr/bin/minecraft-pi @@ -28,7 +28,7 @@ xhost local:root # Launch Minecraft DOCKER_COMPOSE="docker-compose -f /usr/share/minecraft-pi/client/docker-compose.yml" (${DOCKER_COMPOSE} pull || :) | zenity --class 'Minecraft - Pi edition' --progress --pulsate --no-cancel --auto-close --text 'Updating Minecraft...' -${DOCKER_COMPOSE} run --rm minecraft-pi || : +${DOCKER_COMPOSE} run --rm -T minecraft-pi || : # Kill VirGL kill "${VIRGL_PID}" diff --git a/debian/server/usr/bin/minecraft-pi-server b/debian/server/usr/bin/minecraft-pi-server index 77f258432..ac472f59c 100755 --- a/debian/server/usr/bin/minecraft-pi-server +++ b/debian/server/usr/bin/minecraft-pi-server @@ -7,4 +7,4 @@ export MCPI_ROOT="${PWD}" # Launch Minecraft DOCKER_COMPOSE="docker-compose -f /usr/share/minecraft-pi/server/docker-compose.yml" ${DOCKER_COMPOSE} pull || : -${DOCKER_COMPOSE} run --rm minecraft-pi +${DOCKER_COMPOSE} run --rm -T minecraft-pi diff --git a/mods/src/server/server.cpp b/mods/src/server/server.cpp index 0eb5856da..500c60387 100644 --- a/mods/src/server/server.cpp +++ b/mods/src/server/server.cpp @@ -35,7 +35,7 @@ static ProgressScreen_t ProgressScreen = (ProgressScreen_t) 0x37044; typedef void (*Minecraft_setScreen_t)(unsigned char *minecraft, unsigned char *screen); static Minecraft_setScreen_t Minecraft_setScreen = (Minecraft_setScreen_t) 0x15d6c; -#define INFO(msg, ...) printf("[INFO]: " msg "\n", __VA_ARGS__); +#define INFO(msg, ...) fprintf(stderr, "[INFO]: " msg "\n", __VA_ARGS__); // Store Minecraft For Exit static unsigned char *stored_minecraft = NULL; @@ -159,7 +159,7 @@ static void *Gui_addMessage_original = NULL; static void Gui_addMessage_injection(unsigned char *gui, std::string const& text) { // Print Log Message - printf("[CHAT]: %s\n", text.c_str()); + fprintf(stderr, "[CHAT]: %s\n", text.c_str()); // Call Original Method revert_overwrite((void *) Gui_addMessage, Gui_addMessage_original); @@ -214,7 +214,7 @@ void server_init() { } if (!properties_file.is_open()) { - printf("[ERR]: Unable To Open server.properties\n"); + fprintf(stderr, "[ERR]: Unable To Open server.properties\n"); exit(1); }