From 11e2448d1c66d25b45bb9fb1310afe24f174ee71 Mon Sep 17 00:00:00 2001 From: SuuperW Date: Sat, 1 Sep 2018 12:38:39 -0500 Subject: [PATCH] Better loading of JIT settings from a movie. --- desmume/src/movie.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desmume/src/movie.cpp b/desmume/src/movie.cpp index 1d005c295..32eccd52b 100644 --- a/desmume/src/movie.cpp +++ b/desmume/src/movie.cpp @@ -547,11 +547,13 @@ static void LoadSettingsFromMovie(MovieData movieData) } if (movieData.advancedTiming != -1) CommonSettings.advanced_timing = movieData.advancedTiming; - if (movieData.jitBlockSize != -1) + if (movieData.jitBlockSize > 0 && movieData.jitBlockSize <= 100) { - CommonSettings.use_jit = movieData.jitBlockSize != 0; + CommonSettings.use_jit = true; CommonSettings.jit_max_block_size = movieData.jitBlockSize; } + else + CommonSettings.use_jit = false; } void UnloadMovieEmulationSettings() {