[Scummvm-git-logs] scummvm master -> 3fd7f5d168a191fe9b43d02d735adfcaaef6b84b
NMIError
60350957+NMIError at users.noreply.github.com
Sat Aug 14 19:48:18 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1b6b124c57 AUDIO/MIDI: Clear timer registers in OPL driver init
c0388b833c AUDIO/MIDI: Fix OPL empty instrument check
3fd7f5d168 ULTIMA6: Fix yes/no dialog null pointer
Commit: 1b6b124c5759257913f55d2b5dbc3a2db6aa1e92
https://github.com/scummvm/scummvm/commit/1b6b124c5759257913f55d2b5dbc3a2db6aa1e92
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-08-14T21:48:10+02:00
Commit Message:
AUDIO/MIDI: Clear timer registers in OPL driver init
Changed paths:
audio/adlib_ms.cpp
diff --git a/audio/adlib_ms.cpp b/audio/adlib_ms.cpp
index 92ffac3402..5bf959e934 100644
--- a/audio/adlib_ms.cpp
+++ b/audio/adlib_ms.cpp
@@ -950,10 +950,14 @@ void MidiDriver_ADLIB_Multisource::initOpl() {
writeRegister(OPL_REGISTER_TEST | OPL_REGISTER_SET_2_OFFSET, _oplType == OPL::Config::kOpl3 ? 0 : 0x20, true);
}
- // Stop and mask the timers and reset the interrupt.
+ // Clear, stop and mask the timers and reset the interrupt.
+ writeRegister(OPL_REGISTER_TIMER1, 0, true);
+ writeRegister(OPL_REGISTER_TIMER2, 0, true);
writeRegister(OPL_REGISTER_TIMERCONTROL, 0x60, true);
writeRegister(OPL_REGISTER_TIMERCONTROL, 0x80, true);
if (_oplType == OPL::Config::kDualOpl2) {
+ writeRegister(OPL_REGISTER_TIMER1 | OPL_REGISTER_SET_2_OFFSET, 0, true);
+ writeRegister(OPL_REGISTER_TIMER2 | OPL_REGISTER_SET_2_OFFSET, 0, true);
writeRegister(OPL_REGISTER_TIMERCONTROL | OPL_REGISTER_SET_2_OFFSET, 0x60, true);
writeRegister(OPL_REGISTER_TIMERCONTROL | OPL_REGISTER_SET_2_OFFSET, 0x80, true);
}
Commit: c0388b833cbf3a79594bd05c3deeafe79f6b5746
https://github.com/scummvm/scummvm/commit/c0388b833cbf3a79594bd05c3deeafe79f6b5746
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-08-14T21:48:10+02:00
Commit Message:
AUDIO/MIDI: Fix OPL empty instrument check
The empty OPL instrument check would check only the ADSR envelope fields for 0,
assuming this would mean the instrument would produce no sound. However, some
of these fields are flipped, i.e. max value would produce no sound. So this
shortcut was invalid. It is replaced by checking all fields for 0.
Changed paths:
audio/adlib_ms.cpp
diff --git a/audio/adlib_ms.cpp b/audio/adlib_ms.cpp
index 5bf959e934..c504371872 100644
--- a/audio/adlib_ms.cpp
+++ b/audio/adlib_ms.cpp
@@ -25,12 +25,14 @@
#include "common/debug.h"
bool OplInstrumentDefinition::isEmpty() {
- // An instrument with 0 attack, decay, sustain and release produces no
- // sound. Check this as a shorthand for checking every field for 0.
- return operator0.decayAttack == 0 && operator0.releaseSustain == 0 &&
- operator1.decayAttack == 0 && operator1.releaseSustain == 0 &&
- (!fourOperator || (operator2.decayAttack == 0 && operator2.releaseSustain == 0 &&
- operator3.decayAttack == 0 && operator3.releaseSustain == 0));
+ return operator0.freqMultMisc == 0 && operator0.level == 0 && operator0.decayAttack == 0 &&
+ operator0.releaseSustain == 0 && operator0.waveformSelect == 0 &&
+ operator1.freqMultMisc == 0 && operator1.level == 0 && operator1.decayAttack == 0 &&
+ operator1.releaseSustain == 0 && operator1.waveformSelect == 0 && connectionFeedback0 == 0 &&
+ (!fourOperator || (operator2.freqMultMisc == 0 && operator2.level == 0 && operator2.decayAttack == 0 &&
+ operator2.releaseSustain == 0 && operator2.waveformSelect == 0 &&
+ operator3.freqMultMisc == 0 && operator3.level == 0 && operator3.decayAttack == 0 &&
+ operator3.releaseSustain == 0 && operator3.waveformSelect == 0 && connectionFeedback1 == 0));
}
uint8 OplInstrumentDefinition::getNumberOfOperators() {
Commit: 3fd7f5d168a191fe9b43d02d735adfcaaef6b84b
https://github.com/scummvm/scummvm/commit/3fd7f5d168a191fe9b43d02d735adfcaaef6b84b
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-08-14T21:48:10+02:00
Commit Message:
ULTIMA6: Fix yes/no dialog null pointer
The yes/no dialog would not pass a pointer to itself as a data parameter to the
callback when an otherwise unhandled key was pressed. Events::callback needs
this pointer to clear the dialog and would dereference the null data parameter.
Fixed this by adding the missing parameter. This fixes bug #12533.
Changed paths:
engines/ultima/nuvie/gui/gui_yes_no_dialog.cpp
diff --git a/engines/ultima/nuvie/gui/gui_yes_no_dialog.cpp b/engines/ultima/nuvie/gui/gui_yes_no_dialog.cpp
index 851e2a6f8c..82ca6bac07 100644
--- a/engines/ultima/nuvie/gui/gui_yes_no_dialog.cpp
+++ b/engines/ultima/nuvie/gui/gui_yes_no_dialog.cpp
@@ -86,7 +86,7 @@ GUI_status GUI_YesNoDialog::KeyDown(const Common::KeyState &key) {
break;
}
- return (GUI_status)no_callback_object->callback(YESNODIALOG_CB_NO, nullptr);
+ return (GUI_status)no_callback_object->callback(YESNODIALOG_CB_NO, nullptr, this);
}
GUI_status GUI_YesNoDialog::callback(uint16 msg, GUI_CallBack *caller, void *data) {
More information about the Scummvm-git-logs
mailing list