Add suggested changes

This commit is contained in:
Liriosha 2026-03-20 11:59:37 -04:00
parent eb66f5a705
commit d54e365d1a
4 changed files with 10 additions and 8 deletions

View file

@ -562,13 +562,13 @@ void Minecraft::setScreen(Screen* m_screen) {
#endif
}
if (dynamic_cast<TitleScreen*>(screen) != NULL) {
if (dynamic_cast<TitleScreen*>(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);
}

View file

@ -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

View file

@ -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',

View file

@ -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.')