mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
Random minor fixes (#757)
* Fix incorrect/questionable assert() usage Originally reported by https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2159000700, but also includes a bunch of other fixes. * Fix some `printf` warnings Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2160310550 * Remove useless check It is never passed thanks to `if (num_in < 1) {...; return}` before Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840804 * Add missing header guard, rename other to avoid conflicts Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2163210746 * Make DSi_SDDevice destructor virtual Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2158670642 * Use thread-safe localtime_r, assign `time` result directly Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840805 * Fix MinGW build It needs _POSIX_THREAD_SAFE_FUNCTIONS to export `localtime_r`
This commit is contained in:
@ -228,7 +228,7 @@ void KeyMapButton::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (!isChecked()) return QPushButton::keyPressEvent(event);
|
||||
|
||||
printf("KEY PRESSED = %08X %08X | %08X %08X %08X\n", event->key(), event->modifiers(), event->nativeVirtualKey(), event->nativeModifiers(), event->nativeScanCode());
|
||||
printf("KEY PRESSED = %08X %08X | %08X %08X %08X\n", event->key(), (int)event->modifiers(), event->nativeVirtualKey(), event->nativeModifiers(), event->nativeScanCode());
|
||||
|
||||
int key = event->key();
|
||||
int mod = event->modifiers();
|
||||
|
@ -115,7 +115,6 @@ void audioCallback(void* data, Uint8* stream, int len)
|
||||
if (num_in < len_in-margin)
|
||||
{
|
||||
int last = num_in-1;
|
||||
if (last < 0) last = 0;
|
||||
|
||||
for (int i = num_in; i < len_in-margin; i++)
|
||||
((u32*)buf_in)[i] = ((u32*)buf_in)[last];
|
||||
|
Reference in New Issue
Block a user