diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 8eb2d7554..a54378a67 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -562,13 +562,13 @@ void Minecraft::setScreen(Screen* m_screen) { #endif } - if (dynamic_cast(screen) != NULL) { + if (dynamic_cast(m_screen) != NULL) { options->renderDebug = false; gui->clearMessages(); } this->screen = m_screen; - if (screen != NULL) { + if (m_screen != NULL) { // releaseMouse(); // 4J - removed ScreenSizeCalculator ssc(options, width, height); int screenWidth = ssc.getWidth(); @@ -653,7 +653,7 @@ void Minecraft::destroy() { } this->screen = m_screen; - if (screen != NULL) { + if (m_screen != NULL) { // releaseMouse(); // 4J - removed ScreenSizeCalculator ssc(options, width, height); int screenWidth = ssc.getWidth(); @@ -667,7 +667,7 @@ void Minecraft::destroy() { // 4J-PB - if a screen has been set, go into menu mode // it's possible that player doesn't exist here yet #ifdef ENABLE_JAVA_GUIS - if (screen != NULL) { + if (m_screen != NULL) { if (player && player->GetXboxPad() != -1) { InputManager.SetMenuDisplayed(player->GetXboxPad(), true); } diff --git a/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp index 74206559f..65b6270a8 100644 --- a/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp @@ -254,6 +254,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, } } } + if (!found) return; MiniAudioSound* s = new MiniAudioSound(); memset(&s->info, 0, sizeof(AUDIO_INFO)); @@ -322,6 +323,7 @@ void SoundEngine::playUI(int iSound, float volume, float pitch) { break; } } + if (!found) return; MiniAudioSound* s = new MiniAudioSound(); memset(&s->info, 0, sizeof(AUDIO_INFO)); @@ -2318,7 +2320,7 @@ void SoundEngine::SetStreamingSounds(int iOverworldMin, int iOverWorldMax, delete[] m_bHeardTrackA; } m_bHeardTrackA = new bool[iEndMax + 1]; - memset(m_bHeardTrackA, 0, sizeof(bool) * iEndMax + 1); + memset(m_bHeardTrackA, 0, sizeof(bool) * (iEndMax + 1)); } int SoundEngine::GetRandomishTrack(int iStart, int iEnd) { // 4J-PB - make it more likely that we'll get a track we've not heard for a diff --git a/meson.build b/meson.build index 1c98810c0..2df77dd01 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('4jcraft-chucklegrounds', ['cpp', 'c'], version : '0.1.0', - meson_version: '>= 1.1', + meson_version: '>= 1.7', default_options : [ 'cpp_std=c++23', 'warning_level=0', diff --git a/meson.options b/meson.options index 7ead0b06f..74de97f98 100644 --- a/meson.options +++ b/meson.options @@ -1,6 +1,6 @@ option('enable_java_guis', type : 'boolean', - value : true, + value : false, description : 'Re-enable the Java UI remnants in the code (for testing only)') option('enable_vsync', @@ -10,5 +10,5 @@ option('enable_vsync', option('enable_shiggy', type : 'boolean', - value : false, + value : true, description : 'Toggles shimmed PS4 Iggy binaries and UI for x86_64 Linux.')