diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2017-06-17 17:52:38 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2017-06-17 17:52:38 +0200 |
commit | 5d911895bec79b393b4b47f09fac3a29d8ebb1c1 (patch) | |
tree | fca63230f2db47c37a1727a5853e6125428bb00b /src | |
parent | 0f2a2e541ddcdfb26f8f0dbd8a7179740409f813 (diff) |
New upstream version 3.8.2
Diffstat (limited to 'src')
-rw-r--r-- | src/console/Spc_Cpu.h | 11 | ||||
-rw-r--r-- | src/console/Spc_Dsp.cc | 7 | ||||
-rw-r--r-- | src/ffaudio/ffaudio-core.cc | 7 | ||||
-rw-r--r-- | src/search-tool-qt/search-tool-qt.cc | 1 | ||||
-rw-r--r-- | src/statusicon-qt/statusicon.cc | 10 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/console/Spc_Cpu.h b/src/console/Spc_Cpu.h index 11eb932..75e0f61 100644 --- a/src/console/Spc_Cpu.h +++ b/src/console/Spc_Cpu.h @@ -76,8 +76,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ // TODO: remove non-wrapping versions? #define SPC_NO_SP_WRAPAROUND 0 -#define SET_SP( v ) (sp = ram + 0x101 + (v)) -#define GET_SP() (sp - 0x101 - ram) +#define SET_SP( v ) (sp = ram + 0x101 + ((uint8_t) v)) +#define GET_SP() (uint8_t) (sp - 0x101 - ram) #if SPC_NO_SP_WRAPAROUND #define PUSH16( v ) (sp -= 2, SET_LE16( sp, v )) @@ -485,7 +485,7 @@ loop: case 0xAF: // MOV (X)+,A WRITE_DP( 0, x, a + no_read_before_write ); - x++; + x = (uint8_t) (x + 1); goto loop; // 5. 8-BIT LOGIC OPERATION COMMANDS @@ -808,7 +808,7 @@ loop: unsigned temp = y * a; a = (uint8_t) temp; nz = ((temp >> 1) | temp) & 0x7F; - y = temp >> 8; + y = (uint8_t) (temp >> 8); nz |= y; goto loop; } @@ -838,6 +838,7 @@ loop: nz = (uint8_t) a; a = (uint8_t) a; + y = (uint8_t) y; goto loop; } @@ -1004,7 +1005,7 @@ loop: case 0x7F: // RET1 temp = *sp; SET_PC( GET_LE16( sp + 1 ) ); - sp += 3; + SET_SP( GET_SP() + 3 ); goto set_psw; case 0x8E: // POP PSW POP( temp ); diff --git a/src/console/Spc_Dsp.cc b/src/console/Spc_Dsp.cc index 1786add..a98a83a 100644 --- a/src/console/Spc_Dsp.cc +++ b/src/console/Spc_Dsp.cc @@ -641,7 +641,12 @@ void Spc_Dsp::mute_voices( int mask ) void Spc_Dsp::init( void* ram_64k ) { m.ram = (uint8_t*) ram_64k; - mute_voices( 0 ); + + // [jlindgren 2016/12/16] Calling mute_voices() before load() causes an + // unitialized read of m.regs; instead, just set m.mute_mask here, as we + // know mute_voices() will be called as part of load() anyway. + m.mute_mask = 0; // mute_voices( 0 ); + disable_surround( false ); set_output( 0, 0 ); reset(); diff --git a/src/ffaudio/ffaudio-core.cc b/src/ffaudio/ffaudio-core.cc index 4800db1..390160c 100644 --- a/src/ffaudio/ffaudio-core.cc +++ b/src/ffaudio/ffaudio-core.cc @@ -99,7 +99,8 @@ struct ScopedContext struct ScopedPacket : public AVPacket { - ScopedPacket () { av_init_packet (this); } + ScopedPacket () : AVPacket () + { av_init_packet (this); } #if CHECK_LIBAVCODEC_VERSION (55, 25, 100, 55, 16, 0) ~ScopedPacket () { av_packet_unref (this); } @@ -553,8 +554,10 @@ bool FFaudio::play (const char * filename, VFSFile & file) /* On EOF, send an empty packet to "flush" the decoder */ /* Otherwise, make a mutable (shallow) copy of the real packet */ AVPacket tmp; - if (eof) + if (eof) { + tmp = AVPacket (); av_init_packet (& tmp); + } else tmp = pkt; diff --git a/src/search-tool-qt/search-tool-qt.cc b/src/search-tool-qt/search-tool-qt.cc index aab0cee..fba5335 100644 --- a/src/search-tool-qt/search-tool-qt.cc +++ b/src/search-tool-qt/search-tool-qt.cc @@ -754,6 +754,7 @@ void * SearchToolQt::get_qt_widget () auto button = new QPushButton (QIcon::fromTheme ("view-refresh"), QString ()); button->setFlat (true); + button->setFocusPolicy (Qt::NoFocus); hbox->addWidget (button); String uri = get_uri (); diff --git a/src/statusicon-qt/statusicon.cc b/src/statusicon-qt/statusicon.cc index f72b874..b0c9244 100644 --- a/src/statusicon-qt/statusicon.cc +++ b/src/statusicon-qt/statusicon.cc @@ -108,10 +108,6 @@ bool StatusIcon::init () tray = new QSystemTrayIcon (qApp->windowIcon ()); QObject::connect (tray, & QSystemTrayIcon::activated, activate); menu = audqt::menu_build (items); - // Very dirty hack to get along with KDE5 SNI implementation - // which adds Quit action without any permission. - // See below in activate(). - menu->actions ().last ()->setVisible (false); tray->setContextMenu (menu); QObject::connect (menu, & QMenu::aboutToShow, update_menu); tray->show (); @@ -158,12 +154,6 @@ void StatusIcon::activate(QSystemTrayIcon::ActivationReason reason) toggle_aud_ui (); break; - case QSystemTrayIcon::Context: - // It is expected that only KDE5 SNI implementation blocks this activation signal. - // So getting it means we aren't in KDE and should show the Quit action. - menu->actions ().last ()->setVisible (true); - break; - case QSystemTrayIcon::MiddleClick: aud_drct_pause (); break; |