Compare commits
4 Commits
f0a39ec189
...
d813e0805f
Author | SHA1 | Date |
---|---|---|
Zach Bacon | d813e0805f | |
Weiran Wu | 613bd4038a | |
Zach Bacon | b950a7c1a5 | |
Rafael Kitover | ecb69a240a |
|
@ -45,7 +45,7 @@ if(TAG_RELEASE)
|
||||||
include(MakeReleaseCommitAndTag)
|
include(MakeReleaseCommitAndTag)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VCPKG_DEPS pkgconf zlib "sdl2[samplerate]" gettext wxwidgets)
|
set(VCPKG_DEPS pkgconf zlib pthreads "sdl2[samplerate]" gettext wxwidgets)
|
||||||
|
|
||||||
set(VCPKG_DEPS_OPTIONAL
|
set(VCPKG_DEPS_OPTIONAL
|
||||||
sfml ENABLE_LINK
|
sfml ENABLE_LINK
|
||||||
|
@ -417,6 +417,28 @@ if(ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS)
|
||||||
set(ASM_ENABLED ON)
|
set(ASM_ENABLED ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
find_library(PTHREAD_LIB pthread)
|
||||||
|
if(PTHREAD_LIB)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PTHREAD_LIB})
|
||||||
|
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${PTHREAD_LIB})
|
||||||
|
endif()
|
||||||
|
elseif(MINGW)
|
||||||
|
if(NOT VBAM_STATIC)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} -lpthread)
|
||||||
|
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} -lpthread)
|
||||||
|
else()
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
|
||||||
|
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
find_package(PThreads4W)
|
||||||
|
if(PThreads4W_FOUND)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} PThreads4W::PThreads4W)
|
||||||
|
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} PThreads4W::PThreads4W)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Look for some dependencies using CMake scripts
|
# Look for some dependencies using CMake scripts
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
@ -509,22 +531,6 @@ if(ENABLE_LINK)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT WIN32)
|
|
||||||
find_library(PTHREAD_LIB pthread)
|
|
||||||
if(PTHREAD_LIB)
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PTHREAD_LIB})
|
|
||||||
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${PTHREAD_LIB})
|
|
||||||
endif()
|
|
||||||
elseif(MINGW)
|
|
||||||
if(NOT VBAM_STATIC)
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} -lpthread)
|
|
||||||
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} -lpthread)
|
|
||||||
else()
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
|
|
||||||
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
check_function_exists(sem_timedwait SEM_TIMEDWAIT)
|
check_function_exists(sem_timedwait SEM_TIMEDWAIT)
|
||||||
if(SEM_TIMEDWAIT)
|
if(SEM_TIMEDWAIT)
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-01-15 14:15-0500\n"
|
"POT-Creation-Date: 2024-03-06 18:49+0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -262,7 +262,7 @@ msgstr ""
|
||||||
msgid "New Value"
|
msgid "New Value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: guiinit.cpp:2794
|
#: guiinit.cpp:2796
|
||||||
msgid "JoyBus host invalid; disabling"
|
msgid "JoyBus host invalid; disabling"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -539,33 +539,33 @@ msgstr ""
|
||||||
msgid "Waiting for GDB..."
|
msgid "Waiting for GDB..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2215 panel.cpp:260 panel.cpp:372
|
#: cmdevents.cpp:2207 panel.cpp:260 panel.cpp:372
|
||||||
msgid "Could not initialize the sound driver!"
|
msgid "Could not initialize the sound driver!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2284
|
#: cmdevents.cpp:2276
|
||||||
msgid ""
|
msgid ""
|
||||||
"YOUR CONFIGURATION WILL BE DELETED!\n"
|
"YOUR CONFIGURATION WILL BE DELETED!\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Are you sure?"
|
"Are you sure?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2285
|
#: cmdevents.cpp:2277
|
||||||
msgid "FACTORY RESET"
|
msgid "FACTORY RESET"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2320
|
#: cmdevents.cpp:2312
|
||||||
msgid "Nintendo Game Boy / Color / Advance emulator."
|
msgid "Nintendo Game Boy / Color / Advance emulator."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2321
|
#: cmdevents.cpp:2313
|
||||||
msgid ""
|
msgid ""
|
||||||
"Copyright (C) 1999-2003 Forgotten\n"
|
"Copyright (C) 1999-2003 Forgotten\n"
|
||||||
"Copyright (C) 2004-2006 VBA development team\n"
|
"Copyright (C) 2004-2006 VBA development team\n"
|
||||||
"Copyright (C) 2007-2020 VBA-M development team"
|
"Copyright (C) 2007-2020 VBA-M development team"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2323
|
#: cmdevents.cpp:2315
|
||||||
msgid ""
|
msgid ""
|
||||||
"This program is free software: you can redistribute it and / or modify\n"
|
"This program is free software: you can redistribute it and / or modify\n"
|
||||||
"it under the terms of the GNU General Public License as published by\n"
|
"it under the terms of the GNU General Public License as published by\n"
|
||||||
|
@ -581,15 +581,15 @@ msgid ""
|
||||||
"along with this program. If not, see http://www.gnu.org/licenses ."
|
"along with this program. If not, see http://www.gnu.org/licenses ."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2508
|
#: cmdevents.cpp:2500
|
||||||
msgid "Cannot use Game Boy BIOS when Colorizer Hack is enabled."
|
msgid "Cannot use Game Boy BIOS when Colorizer Hack is enabled."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2564
|
#: cmdevents.cpp:2566
|
||||||
msgid "LAN link is already active. Disable link mode to disconnect."
|
msgid "LAN link is already active. Disable link mode to disconnect."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cmdevents.cpp:2570
|
#: cmdevents.cpp:2572
|
||||||
msgid "Network is not supported in local mode."
|
msgid "Network is not supported in local mode."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1320,8 +1320,8 @@ msgstr ""
|
||||||
#: config/internal/option-internal.cpp:666
|
#: config/internal/option-internal.cpp:666
|
||||||
#: config/internal/option-internal.cpp:686
|
#: config/internal/option-internal.cpp:686
|
||||||
#: config/internal/option-internal.cpp:707
|
#: config/internal/option-internal.cpp:707
|
||||||
#: config/internal/option-internal.cpp:727
|
#: config/internal/option-internal.cpp:738
|
||||||
#: config/internal/option-internal.cpp:747
|
#: config/internal/option-internal.cpp:758
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid value %s for option %s; valid values are %s"
|
msgid "Invalid value %s for option %s; valid values are %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2689,7 +2689,7 @@ msgid ""
|
||||||
"entire contents if too small."
|
"entire contents if too small."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:14 xrc/MainMenu.xrc:456
|
#: xrc/JoyPanel.xrc:14 xrc/MainMenu.xrc:452
|
||||||
msgid "Up"
|
msgid "Up"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2697,7 +2697,7 @@ msgstr ""
|
||||||
msgid "A"
|
msgid "A"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:60 xrc/MainMenu.xrc:460
|
#: xrc/JoyPanel.xrc:60 xrc/MainMenu.xrc:456
|
||||||
msgid "Down"
|
msgid "Down"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2705,7 +2705,7 @@ msgstr ""
|
||||||
msgid "B"
|
msgid "B"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:106 xrc/MainMenu.xrc:464
|
#: xrc/JoyPanel.xrc:106 xrc/MainMenu.xrc:460
|
||||||
msgid "Left"
|
msgid "Left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2713,7 +2713,7 @@ msgstr ""
|
||||||
msgid "L"
|
msgid "L"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:152 xrc/MainMenu.xrc:468
|
#: xrc/JoyPanel.xrc:152 xrc/MainMenu.xrc:464
|
||||||
msgid "Right"
|
msgid "Right"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2721,11 +2721,11 @@ msgstr ""
|
||||||
msgid "R"
|
msgid "R"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:199 xrc/MainMenu.xrc:488
|
#: xrc/JoyPanel.xrc:199 xrc/MainMenu.xrc:484
|
||||||
msgid "Select"
|
msgid "Select"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/JoyPanel.xrc:222 xrc/MainMenu.xrc:492
|
#: xrc/JoyPanel.xrc:222 xrc/MainMenu.xrc:488
|
||||||
msgid "Start"
|
msgid "Start"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3137,8 +3137,8 @@ msgstr ""
|
||||||
msgid "&Speed hack"
|
msgid "&Speed hack"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:310 xrc/MainMenu.xrc:316 xrc/MainMenu.xrc:387
|
#: xrc/MainMenu.xrc:310 xrc/MainMenu.xrc:316 xrc/MainMenu.xrc:383
|
||||||
#: xrc/MainMenu.xrc:423
|
#: xrc/MainMenu.xrc:419
|
||||||
msgid "&Configure..."
|
msgid "&Configure..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3199,286 +3199,294 @@ msgid "&Keep window on top"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:372
|
#: xrc/MainMenu.xrc:372
|
||||||
msgid "&Status bar"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:376
|
|
||||||
msgid "&Disable on-screen display"
|
msgid "&Disable on-screen display"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:380
|
#: xrc/MainMenu.xrc:376
|
||||||
msgid "&Transparent on-screen display"
|
msgid "&Transparent on-screen display"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:385
|
#: xrc/MainMenu.xrc:381
|
||||||
msgid "&Audio"
|
msgid "&Audio"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:390
|
#: xrc/MainMenu.xrc:386
|
||||||
msgid "&Increase volume"
|
msgid "&Increase volume"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:394
|
#: xrc/MainMenu.xrc:390
|
||||||
msgid "&Decrease volume"
|
msgid "&Decrease volume"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:398
|
#: xrc/MainMenu.xrc:394
|
||||||
msgid "&Toggle sound"
|
msgid "&Toggle sound"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:403
|
#: xrc/MainMenu.xrc:399
|
||||||
msgid "&Game Boy Advance sound interpolation"
|
msgid "&Game Boy Advance sound interpolation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:408
|
#: xrc/MainMenu.xrc:404
|
||||||
msgid "&Game Boy sound enhancement"
|
msgid "&Game Boy sound enhancement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:412
|
#: xrc/MainMenu.xrc:408
|
||||||
msgid "&Game Boy surround sound effect"
|
msgid "&Game Boy surround sound effect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:416
|
#: xrc/MainMenu.xrc:412
|
||||||
msgid "&Game Boy sound declicking"
|
msgid "&Game Boy sound declicking"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:421
|
#: xrc/MainMenu.xrc:417
|
||||||
msgid "&Input"
|
msgid "&Input"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:426
|
#: xrc/MainMenu.xrc:422
|
||||||
msgid "Allow &keyboard background input"
|
msgid "Allow &keyboard background input"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:430
|
#: xrc/MainMenu.xrc:426
|
||||||
msgid "Allow &joystick background input"
|
msgid "Allow &joystick background input"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:435
|
#: xrc/MainMenu.xrc:431
|
||||||
msgid "&Autofire"
|
msgid "&Autofire"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:454
|
#: xrc/MainMenu.xrc:450
|
||||||
msgid "&Autohold"
|
msgid "&Autohold"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:472
|
#: xrc/MainMenu.xrc:468
|
||||||
msgid "&A"
|
msgid "&A"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:476
|
#: xrc/MainMenu.xrc:472
|
||||||
msgid "&B"
|
msgid "&B"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:480
|
#: xrc/MainMenu.xrc:476
|
||||||
msgid "&L"
|
msgid "&L"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:484
|
#: xrc/MainMenu.xrc:480
|
||||||
msgid "&R"
|
msgid "&R"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:500 xrc/MainMenu.xrc:523
|
#: xrc/MainMenu.xrc:496 xrc/MainMenu.xrc:519
|
||||||
msgid "Configure..."
|
msgid "Configure..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:504
|
#: xrc/MainMenu.xrc:500
|
||||||
msgid "&Real-time clock"
|
msgid "&Real-time clock"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:508
|
#: xrc/MainMenu.xrc:504
|
||||||
msgid "&Use BIOS file"
|
msgid "&Use BIOS file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:512
|
#: xrc/MainMenu.xrc:508
|
||||||
msgid "&Debug print"
|
msgid "&Debug print"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:516 xrc/MainMenu.xrc:531
|
#: xrc/MainMenu.xrc:512 xrc/MainMenu.xrc:527
|
||||||
msgid "&LCD Filter"
|
msgid "&LCD Filter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:527
|
#: xrc/MainMenu.xrc:523
|
||||||
msgid "&Game Boy color option"
|
msgid "&Game Boy color option"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:535
|
#: xrc/MainMenu.xrc:531
|
||||||
msgid "&Game Boy Colorizer Hack (requires restart)"
|
msgid "&Game Boy Colorizer Hack (requires restart)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:539
|
#: xrc/MainMenu.xrc:535
|
||||||
msgid "&Game Boy printer"
|
msgid "&Game Boy printer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:543
|
#: xrc/MainMenu.xrc:539
|
||||||
msgid "&Gather a full page before printing"
|
msgid "&Gather a full page before printing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:547
|
#: xrc/MainMenu.xrc:543
|
||||||
msgid "&Save printouts as screen captures"
|
msgid "&Save printouts as screen captures"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:552
|
#: xrc/MainMenu.xrc:548
|
||||||
msgid "&Use Game Boy BIOS file (requires restart)"
|
msgid "&Use Game Boy BIOS file (requires restart)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:556
|
#: xrc/MainMenu.xrc:552
|
||||||
msgid "&Use Game Boy Color BIOS file"
|
msgid "&Use Game Boy Color BIOS file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:561
|
#: xrc/MainMenu.xrc:557
|
||||||
msgid "&General..."
|
msgid "&General..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:564
|
#: xrc/MainMenu.xrc:560
|
||||||
msgid "&Speedup / Turbo..."
|
msgid "&Speedup / Turbo..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:567
|
#: xrc/MainMenu.xrc:563
|
||||||
msgid "D&irectories..."
|
msgid "D&irectories..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:570
|
#: xrc/MainMenu.xrc:566
|
||||||
msgid "&Key Shortcuts..."
|
msgid "&Key Shortcuts..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:573
|
#: xrc/MainMenu.xrc:569
|
||||||
msgid "&UI Settings..."
|
msgid "UI Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:577
|
#: xrc/MainMenu.xrc:571
|
||||||
msgid "&Tools"
|
msgid "Enable &Status bar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: xrc/MainMenu.xrc:575
|
||||||
|
msgid "Hide &Menu Bar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:579
|
#: xrc/MainMenu.xrc:579
|
||||||
|
msgid "Suspend &Screen Saver"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: xrc/MainMenu.xrc:585
|
||||||
|
msgid "&Tools"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: xrc/MainMenu.xrc:587
|
||||||
msgid "&Cheats"
|
msgid "&Cheats"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:581
|
#: xrc/MainMenu.xrc:589
|
||||||
msgid "List &cheats..."
|
msgid "List &cheats..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:584
|
#: xrc/MainMenu.xrc:592
|
||||||
msgid "Find c&heat..."
|
msgid "Find c&heat..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:588
|
#: xrc/MainMenu.xrc:596
|
||||||
msgid "A&utomatically save / load cheats"
|
msgid "A&utomatically save / load cheats"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:592
|
#: xrc/MainMenu.xrc:600
|
||||||
msgid "&Enable cheats"
|
msgid "&Enable cheats"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:599
|
#: xrc/MainMenu.xrc:607
|
||||||
msgid "&Break into GDB"
|
msgid "&Break into GDB"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:603
|
#: xrc/MainMenu.xrc:611
|
||||||
msgid "&Configure port..."
|
msgid "&Configure port..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:606
|
#: xrc/MainMenu.xrc:614
|
||||||
msgid "&Break on load"
|
msgid "&Break on load"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:611
|
#: xrc/MainMenu.xrc:619
|
||||||
msgid "&Disconnect"
|
msgid "&Disconnect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:616
|
#: xrc/MainMenu.xrc:624
|
||||||
msgid "&Disassemble..."
|
msgid "&Disassemble..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:619
|
#: xrc/MainMenu.xrc:627
|
||||||
msgid "&Logging..."
|
msgid "&Logging..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:622
|
#: xrc/MainMenu.xrc:630
|
||||||
msgid "&IO Viewer..."
|
msgid "&IO Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:625
|
#: xrc/MainMenu.xrc:633
|
||||||
msgid "&Map Viewer..."
|
msgid "&Map Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:628
|
#: xrc/MainMenu.xrc:636
|
||||||
msgid "M&emory Viewer..."
|
msgid "M&emory Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:631
|
#: xrc/MainMenu.xrc:639
|
||||||
msgid "&OAM Viewer..."
|
msgid "&OAM Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:634
|
#: xrc/MainMenu.xrc:642
|
||||||
msgid "&Palette Viewer..."
|
msgid "&Palette Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:637
|
#: xrc/MainMenu.xrc:645
|
||||||
msgid "&Tile Viewer..."
|
msgid "&Tile Viewer..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:642
|
#: xrc/MainMenu.xrc:650
|
||||||
msgid "Show all video layers"
|
msgid "Show all video layers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:685
|
#: xrc/MainMenu.xrc:693
|
||||||
msgid "&View Layers"
|
msgid "&View Layers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:689
|
#: xrc/MainMenu.xrc:697
|
||||||
msgid "Channel &1"
|
msgid "Channel &1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:694
|
#: xrc/MainMenu.xrc:702
|
||||||
msgid "Channel &2"
|
msgid "Channel &2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:699
|
#: xrc/MainMenu.xrc:707
|
||||||
msgid "Channel &3"
|
msgid "Channel &3"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:704
|
#: xrc/MainMenu.xrc:712
|
||||||
msgid "Channel &4"
|
msgid "Channel &4"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:709
|
#: xrc/MainMenu.xrc:717
|
||||||
msgid "Direct Sound &A"
|
msgid "Direct Sound &A"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:714
|
#: xrc/MainMenu.xrc:722
|
||||||
msgid "Direct Sound &B"
|
msgid "Direct Sound &B"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:718
|
#: xrc/MainMenu.xrc:726
|
||||||
msgid "&Sound Channels"
|
msgid "&Sound Channels"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:722
|
#: xrc/MainMenu.xrc:730
|
||||||
msgid "&Help"
|
msgid "&Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:724
|
#: xrc/MainMenu.xrc:732
|
||||||
msgid "Report &Bugs"
|
msgid "Report &Bugs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:727
|
#: xrc/MainMenu.xrc:735
|
||||||
msgid "Visual Boy Advance-M Support &Forum"
|
msgid "Visual Boy Advance-M Support &Forum"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:730
|
#: xrc/MainMenu.xrc:738
|
||||||
msgid "Translations"
|
msgid "Translations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:738
|
#: xrc/MainMenu.xrc:746
|
||||||
msgid "Check for updates"
|
msgid "Check for updates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:741
|
#: xrc/MainMenu.xrc:749
|
||||||
msgid "&Factory Reset..."
|
msgid "&Factory Reset..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/MainMenu.xrc:745
|
#: xrc/MainMenu.xrc:753
|
||||||
msgid "&About..."
|
msgid "&About..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3697,15 +3705,3 @@ msgstr ""
|
||||||
#: xrc/SpeedupConfig.xrc:50
|
#: xrc/SpeedupConfig.xrc:50
|
||||||
msgid "Frame skip"
|
msgid "Frame skip"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xrc/UIConfig.xrc:4
|
|
||||||
msgid "User Interface Settings"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: xrc/UIConfig.xrc:9
|
|
||||||
msgid "Hide Menu Bar"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: xrc/UIConfig.xrc:16
|
|
||||||
msgid "Suspend ScreenSaver"
|
|
||||||
msgstr ""
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ endif()
|
||||||
|
|
||||||
if(ENABLE_FAUDIO)
|
if(ENABLE_FAUDIO)
|
||||||
find_package(FAudio REQUIRED)
|
find_package(FAudio REQUIRED)
|
||||||
list(APPEND VBAM_LIBS FAudio)
|
list(APPEND VBAM_LIBS FAudio::FAudio)
|
||||||
else()
|
else()
|
||||||
add_definitions(-DNO_FAUDIO)
|
add_definitions(-DNO_FAUDIO)
|
||||||
endif()
|
endif()
|
||||||
|
@ -652,7 +652,6 @@ set(
|
||||||
xrc/SoundConfig.xrc
|
xrc/SoundConfig.xrc
|
||||||
xrc/TileViewer.xrc
|
xrc/TileViewer.xrc
|
||||||
xrc/SpeedupConfig.xrc
|
xrc/SpeedupConfig.xrc
|
||||||
xrc/UIConfig.xrc
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# wxrc does not support xrs files in -c output (> 10x compression)
|
# wxrc does not support xrs files in -c output (> 10x compression)
|
||||||
|
|
|
@ -1957,14 +1957,6 @@ EVT_HANDLER(SpeedupConfigure, "Speedup / Turbo options...")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER(UIConfigure, "UI Settings...")
|
|
||||||
{
|
|
||||||
wxDialog* dlg = GetXRCDialog("UIConfig");
|
|
||||||
|
|
||||||
if (ShowModal(dlg) == wxID_OK)
|
|
||||||
update_opts();
|
|
||||||
}
|
|
||||||
|
|
||||||
EVT_HANDLER(GameBoyConfigure, "Game Boy options...")
|
EVT_HANDLER(GameBoyConfigure, "Game Boy options...")
|
||||||
{
|
{
|
||||||
ShowModal(GetXRCDialog("GameBoyConfig"));
|
ShowModal(GetXRCDialog("GameBoyConfig"));
|
||||||
|
@ -2521,6 +2513,16 @@ EVT_HANDLER(VSync, "Wait for vertical sync")
|
||||||
GetMenuOptionConfig("VSync", config::OptionID::kPrefVsync);
|
GetMenuOptionConfig("VSync", config::OptionID::kPrefVsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EVT_HANDLER(HideMenuBar, "Hide menu bar when mouse is inactive")
|
||||||
|
{
|
||||||
|
GetMenuOptionConfig("HideMenuBar", config::OptionID::kUIHideMenuBar);
|
||||||
|
}
|
||||||
|
|
||||||
|
EVT_HANDLER(SuspendScreenSaver, "Suspend screensaver when game is running")
|
||||||
|
{
|
||||||
|
GetMenuOptionConfig("SuspendScreenSaver", config::OptionID::kUISuspendScreenSaver);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_LINK
|
#ifndef NO_LINK
|
||||||
|
|
||||||
void MainFrame::EnableNetworkMenu()
|
void MainFrame::EnableNetworkMenu()
|
||||||
|
|
|
@ -574,8 +574,8 @@ const std::array<OptionData, kNbOptions + 1> kAllOptionsData = {
|
||||||
OptionData{"ui/allowJoystickBackgroundInput",
|
OptionData{"ui/allowJoystickBackgroundInput",
|
||||||
"AllowJoystickBackgroundInput",
|
"AllowJoystickBackgroundInput",
|
||||||
_("Capture joy events while on background")},
|
_("Capture joy events while on background")},
|
||||||
OptionData{"ui/hideMenuBar", "", _("Hide menu bar when mouse is inactive")},
|
OptionData{"ui/hideMenuBar", "HideMenuBar", _("Hide menu bar when mouse is inactive")},
|
||||||
OptionData{"ui/suspendScreenSaver", "", _("Suspend screensaver when game is running")},
|
OptionData{"ui/suspendScreenSaver", "SuspendScreenSaver", _("Suspend screensaver when game is running")},
|
||||||
|
|
||||||
/// Sound
|
/// Sound
|
||||||
OptionData{"Sound/AudioAPI", "",
|
OptionData{"Sound/AudioAPI", "",
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
#include "../common/SoundDriver.h"
|
#include "../common/SoundDriver.h"
|
||||||
|
|
||||||
// FAudio
|
// FAudio
|
||||||
#include <faudio.h>
|
#include <FAudio.h>
|
||||||
|
|
||||||
// MMDevice API
|
|
||||||
#include <mmdeviceapi.h>
|
#include <mmdeviceapi.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -22,27 +21,26 @@
|
||||||
int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids,
|
int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids,
|
||||||
const wxString* match)
|
const wxString* match)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
uint32_t hr;
|
||||||
UINT32 dev_count = 0;
|
uint32_t dev_count = 0;
|
||||||
|
|
||||||
hr = FAudio_GetDeviceCount(fa, &dev_count);
|
hr = FAudio_GetDeviceCount(fa, &dev_count);
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != 0) {
|
||||||
wxLogError(_("FAudio: Enumerating devices failed!"));
|
wxLogError(_("FAudio: Enumerating devices failed!"));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
FAudioDeviceDetails dd;
|
FAudioDeviceDetails dd;
|
||||||
|
|
||||||
for (UINT32 i = 0; i < dev_count; i++) {
|
for (uint32_t i = 0; i < dev_count; i++) {
|
||||||
hr = FAudio_GetDeviceDetails(fa, i, &dd);
|
hr = FAudio_GetDeviceDetails(fa, i, &dd);
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != 0) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
if (ids) {
|
if (ids) {
|
||||||
ids->push_back((wchar_t*) dd.DeviceID); //FAudio is an interesting beast, but not that hard to adapt... once you get used to it, XAudio2 wouldn't need this, but FAudio declares FAudioDeviceDetails as int32_t
|
ids->push_back((wchar_t*) dd.DeviceID);
|
||||||
names->push_back((wchar_t*) dd.DisplayName);
|
names->push_back((wchar_t*) dd.DisplayName);
|
||||||
} else if (*match == dd.DeviceID)
|
} else if (*match == wxString((wchar_t*) dd.DeviceID))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,22 +51,20 @@ int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids,
|
||||||
|
|
||||||
bool GetFADevices(wxArrayString& names, wxArrayString& ids)
|
bool GetFADevices(wxArrayString& names, wxArrayString& ids)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
uint32_t hr;
|
||||||
FAudio* fa = NULL;
|
FAudio* fa = NULL;
|
||||||
UINT32 flags = 0;
|
uint32_t flags = 0;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
flags = FAUDIO_DEBUG_ENGINE;
|
flags = FAUDIO_DEBUG_ENGINE;
|
||||||
#endif
|
#endif
|
||||||
|
hr = FAudioCreate(&fa, flags, FAUDIO_DEFAULT_PROCESSOR);
|
||||||
|
|
||||||
hr = FAudioCreate(&fa, flags, FAUDIO_DEFAULT_PROCESSOR); //Apparently this needs 3 parameters, the processor.
|
if (hr != 0) {
|
||||||
|
|
||||||
if (hr != S_OK) {
|
|
||||||
wxLogError(_("The FAudio interface failed to initialize!"));
|
wxLogError(_("The FAudio interface failed to initialize!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFADevices(fa, &names, &ids, NULL);
|
GetFADevices(fa, &names, &ids, NULL);
|
||||||
//fa->Release();
|
|
||||||
FAudio_Release(fa);
|
FAudio_Release(fa);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -194,43 +190,44 @@ public:
|
||||||
// Synchronization Event
|
// Synchronization Event
|
||||||
class FAudio_BufferNotify : public FAudioVoiceCallback {
|
class FAudio_BufferNotify : public FAudioVoiceCallback {
|
||||||
public:
|
public:
|
||||||
HANDLE hBufferEndEvent;
|
void *hBufferEndEvent;
|
||||||
|
|
||||||
FAudio_BufferNotify()
|
FAudio_BufferNotify()
|
||||||
{
|
{
|
||||||
hBufferEndEvent = NULL;
|
hBufferEndEvent = NULL;
|
||||||
hBufferEndEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
hBufferEndEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
assert(hBufferEndEvent != NULL);
|
assert(hBufferEndEvent != NULL);
|
||||||
}
|
|
||||||
|
|
||||||
|
OnBufferEnd = &FAudio_BufferNotify::StaticOnBufferEnd;
|
||||||
|
OnVoiceProcessingPassStart = &FAudio_BufferNotify::StaticOnVoiceProcessingPassStart;
|
||||||
|
OnVoiceProcessingPassEnd = &FAudio_BufferNotify::StaticOnVoiceProcessingPassEnd;
|
||||||
|
OnStreamEnd = &FAudio_BufferNotify::StaticOnStreamEnd;
|
||||||
|
OnBufferStart = &FAudio_BufferNotify::StaticOnBufferStart;
|
||||||
|
OnLoopEnd = &FAudio_BufferNotify::StaticOnLoopEnd;
|
||||||
|
OnVoiceError = &FAudio_BufferNotify::StaticOnVoiceError;
|
||||||
|
}
|
||||||
~FAudio_BufferNotify()
|
~FAudio_BufferNotify()
|
||||||
{
|
{
|
||||||
CloseHandle(hBufferEndEvent);
|
CloseHandle(hBufferEndEvent);
|
||||||
hBufferEndEvent = NULL;
|
hBufferEndEvent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHOD_(void, OnBufferEnd)
|
|
||||||
(void* pBufferContext)
|
static void StaticOnBufferEnd(FAudioVoiceCallback* callback, void * pBufferContext) {
|
||||||
{
|
FAudio_BufferNotify* self = static_cast<FAudio_BufferNotify*>(callback);
|
||||||
assert(hBufferEndEvent != NULL);
|
if (self != nullptr && self->hBufferEndEvent != NULL)
|
||||||
SetEvent(hBufferEndEvent);
|
{
|
||||||
|
SetEvent(self->hBufferEndEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
static void StaticOnVoiceProcessingPassStart(FAudioVoiceCallback* callback, uint32_t BytesRequired) {}
|
||||||
// dummies:
|
static void StaticOnVoiceProcessingPassEnd(FAudioVoiceCallback* callback) {}
|
||||||
STDMETHOD_(void, OnVoiceProcessingPassStart)
|
static void StaticOnStreamEnd(FAudioVoiceCallback* callback) {}
|
||||||
(UINT32 BytesRequired) {}
|
static void StaticOnBufferStart(FAudioVoiceCallback* callback, void * pBufferContext) {}
|
||||||
STDMETHOD_(void, OnVoiceProcessingPassEnd)
|
static void StaticOnLoopEnd(FAudioVoiceCallback* callback, void * pBufferContext) {}
|
||||||
() {}
|
static void StaticOnVoiceError(FAudioVoiceCallback* callback, void * pBufferContext, uint32_t Error) {}
|
||||||
STDMETHOD_(void, OnStreamEnd)
|
|
||||||
() {}
|
|
||||||
STDMETHOD_(void, OnBufferStart)
|
|
||||||
(void* pBufferContext) {}
|
|
||||||
STDMETHOD_(void, OnLoopEnd)
|
|
||||||
(void* pBufferContext) {}
|
|
||||||
STDMETHOD_(void, OnVoiceError)
|
|
||||||
(void* pBufferContext, HRESULT Error){};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class Declaration
|
// Class Declaration
|
||||||
class FAudio_Output
|
class FAudio_Output
|
||||||
: public SoundDriver {
|
: public SoundDriver {
|
||||||
|
@ -258,9 +255,9 @@ private:
|
||||||
bool failed;
|
bool failed;
|
||||||
bool initialized;
|
bool initialized;
|
||||||
bool playing;
|
bool playing;
|
||||||
UINT32 freq;
|
uint32_t freq;
|
||||||
UINT32 bufferCount;
|
uint32_t bufferCount;
|
||||||
BYTE* buffers;
|
uint8_t* buffers;
|
||||||
int currentBuffer;
|
int currentBuffer;
|
||||||
int soundBufferLen;
|
int soundBufferLen;
|
||||||
|
|
||||||
|
@ -288,8 +285,8 @@ FAudio_Output::FAudio_Output()
|
||||||
faud = NULL;
|
faud = NULL;
|
||||||
mVoice = NULL;
|
mVoice = NULL;
|
||||||
sVoice = NULL;
|
sVoice = NULL;
|
||||||
ZeroMemory(&buf, sizeof(buf));
|
memset(&buf, NULL, sizeof(buf));
|
||||||
ZeroMemory(&vState, sizeof(vState));
|
memset(&vState, NULL, sizeof(vState));
|
||||||
g_notifier.do_register(this);
|
g_notifier.do_register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,8 +302,7 @@ void FAudio_Output::close()
|
||||||
|
|
||||||
if (sVoice) {
|
if (sVoice) {
|
||||||
if (playing) {
|
if (playing) {
|
||||||
HRESULT hr = FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW);
|
assert(FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW) == 0);
|
||||||
assert(hr == S_OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FAudioVoice_DestroyVoice(sVoice);
|
FAudioVoice_DestroyVoice(sVoice);
|
||||||
|
@ -339,15 +335,15 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
if (failed || initialized)
|
if (failed || initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
HRESULT hr;
|
uint32_t hr;
|
||||||
// Initialize FAudio
|
// Initialize FAudio
|
||||||
UINT32 flags = 0;
|
uint32_t flags = 0;
|
||||||
//#ifdef _DEBUG
|
//#ifdef _DEBUG
|
||||||
// flags = FAUDIO_DEBUG_ENGINE;
|
// flags = FAUDIO_DEBUG_ENGINE;
|
||||||
//#endif
|
//#endif
|
||||||
hr = FAudioCreate(&faud, flags, FAUDIO_DEFAULT_PROCESSOR);
|
hr = FAudioCreate(&faud, flags, FAUDIO_DEFAULT_PROCESSOR);
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != 0) {
|
||||||
wxLogError(_("The FAudio interface failed to initialize!"));
|
wxLogError(_("The FAudio interface failed to initialize!"));
|
||||||
failed = true;
|
failed = true;
|
||||||
return false;
|
return false;
|
||||||
|
@ -359,27 +355,26 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
soundBufferLen = (freq / 60) * 4;
|
soundBufferLen = (freq / 60) * 4;
|
||||||
// create own buffers to store sound data because it must not be
|
// create own buffers to store sound data because it must not be
|
||||||
// manipulated while the voice plays from it
|
// manipulated while the voice plays from it
|
||||||
buffers = (BYTE*)malloc((bufferCount + 1) * soundBufferLen);
|
buffers = (uint8_t*)malloc((bufferCount + 1) * soundBufferLen);
|
||||||
// + 1 because we need one temporary buffer when all others are in use
|
// + 1 because we need one temporary buffer when all others are in use
|
||||||
WAVEFORMATEX wfx;
|
FAudioWaveFormatEx wfx;
|
||||||
ZeroMemory(&wfx, sizeof(wfx));
|
memset(&wfx, NULL, sizeof(wfx));
|
||||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
wfx.wFormatTag = FAUDIO_FORMAT_PCM;
|
||||||
wfx.nChannels = 2;
|
wfx.nChannels = 2;
|
||||||
wfx.nSamplesPerSec = freq;
|
wfx.nSamplesPerSec = freq;
|
||||||
wfx.wBitsPerSample = 16;
|
wfx.wBitsPerSample = 16;
|
||||||
wfx.nBlockAlign = wfx.nChannels * (wfx.wBitsPerSample / 8);
|
wfx.nBlockAlign = wfx.nChannels * (wfx.wBitsPerSample / 8);
|
||||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||||
// create sound receiver
|
// create sound receiver
|
||||||
hr = FAudio_CreateMasteringVoice(
|
hr = FAudio_CreateMasteringVoice(faud,
|
||||||
faud,
|
&mVoice,
|
||||||
&mVoice,
|
FAUDIO_DEFAULT_CHANNELS,
|
||||||
FAUDIO_DEFAULT_CHANNELS,
|
FAUDIO_DEFAULT_SAMPLERATE,
|
||||||
FAUDIO_DEFAULT_SAMPLERATE,
|
0,
|
||||||
0,
|
FAGetDev(faud),
|
||||||
FAGetDev(faud),
|
NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != 0) {
|
||||||
wxLogError(_("FAudio: Creating mastering voice failed!"));
|
wxLogError(_("FAudio: Creating mastering voice failed!"));
|
||||||
failed = true;
|
failed = true;
|
||||||
return false;
|
return false;
|
||||||
|
@ -387,10 +382,9 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
|
|
||||||
// create sound emitter
|
// create sound emitter
|
||||||
//This should be FAudio_CreateSourceVoice()
|
//This should be FAudio_CreateSourceVoice()
|
||||||
//hr = faud->CreateSourceVoice(&sVoice, &wfx, 0, 4.0f, ¬ify);
|
hr = FAudio_CreateSourceVoice(faud, &sVoice, &wfx, 0, 4.0f, ¬ify, NULL, NULL);
|
||||||
hr = FAudio_CreateSourceVoice(faud, &sVoice, (const FAudioWaveFormatEx*)&wfx, 0, 4.0f, ¬ify, NULL, NULL);
|
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != 0) {
|
||||||
wxLogError(_("FAudio: Creating source voice failed!"));
|
wxLogError(_("FAudio: Creating source voice failed!"));
|
||||||
failed = true;
|
failed = true;
|
||||||
return false;
|
return false;
|
||||||
|
@ -399,9 +393,8 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
if (gopts.upmix) {
|
if (gopts.upmix) {
|
||||||
// set up stereo upmixing
|
// set up stereo upmixing
|
||||||
FAudioDeviceDetails dd;
|
FAudioDeviceDetails dd;
|
||||||
ZeroMemory(&dd, sizeof(dd));
|
memset(&dd, NULL, sizeof(dd));
|
||||||
hr = FAudio_GetDeviceDetails(faud, 0, &dd);
|
assert(FAudio_GetDeviceDetails(faud, 0, &dd) == 0);
|
||||||
assert(hr == S_OK);
|
|
||||||
float* matrix = NULL;
|
float* matrix = NULL;
|
||||||
matrix = (float*)malloc(sizeof(float) * 2 * dd.OutputFormat.Format.nChannels);
|
matrix = (float*)malloc(sizeof(float) * 2 * dd.OutputFormat.Format.nChannels);
|
||||||
|
|
||||||
|
@ -497,8 +490,8 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matrixAvailable) {
|
if (matrixAvailable) {
|
||||||
hr = FAudioVoice_SetOutputMatrix(sVoice, NULL, 2, dd.OutputFormat.Format.nChannels, matrix, FAUDIO_DEFAULT_CHANNELS); //What I have here for the OperationSet maybe wrong...
|
hr = FAudioVoice_SetOutputMatrix(sVoice, NULL, 2, dd.OutputFormat.Format.nChannels, matrix, FAUDIO_DEFAULT_CHANNELS);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(matrix);
|
free(matrix);
|
||||||
|
@ -506,7 +499,7 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = FAudioSourceVoice_Start(sVoice, 0, FAUDIO_COMMIT_NOW);
|
hr = FAudioSourceVoice_Start(sVoice, 0, FAUDIO_COMMIT_NOW);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
playing = true;
|
playing = true;
|
||||||
currentBuffer = 0;
|
currentBuffer = 0;
|
||||||
device_changed = false;
|
device_changed = false;
|
||||||
|
@ -516,7 +509,7 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
|
|
||||||
void FAudio_Output::write(uint16_t* finalWave, int length)
|
void FAudio_Output::write(uint16_t* finalWave, int length)
|
||||||
{
|
{
|
||||||
UINT32 flags = 0;
|
uint32_t flags = 0;
|
||||||
if (!initialized || failed)
|
if (!initialized || failed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -547,7 +540,7 @@ void FAudio_Output::write(uint16_t* finalWave, int length)
|
||||||
if (!coreOptions.speedup && coreOptions.throttle && !gba_joybus_active) {
|
if (!coreOptions.speedup && coreOptions.throttle && !gba_joybus_active) {
|
||||||
// wait for one buffer to finish playing
|
// wait for one buffer to finish playing
|
||||||
if (WaitForSingleObject(notify.hBufferEndEvent, 10000) == WAIT_TIMEOUT) {
|
if (WaitForSingleObject(notify.hBufferEndEvent, 10000) == WAIT_TIMEOUT) {
|
||||||
device_changed = true;
|
device_changed = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// drop current audio frame
|
// drop current audio frame
|
||||||
|
@ -557,13 +550,13 @@ void FAudio_Output::write(uint16_t* finalWave, int length)
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy & protect the audio data in own memory area while playing it
|
// copy & protect the audio data in own memory area while playing it
|
||||||
CopyMemory(&buffers[currentBuffer * soundBufferLen], finalWave, soundBufferLen);
|
memcpy(&buffers[currentBuffer * soundBufferLen], finalWave, soundBufferLen);
|
||||||
buf.AudioBytes = soundBufferLen;
|
buf.AudioBytes = soundBufferLen;
|
||||||
buf.pAudioData = &buffers[currentBuffer * soundBufferLen];
|
buf.pAudioData = &buffers[currentBuffer * soundBufferLen];
|
||||||
currentBuffer++;
|
currentBuffer++;
|
||||||
currentBuffer %= (bufferCount + 1); // + 1 because we need one temporary buffer
|
currentBuffer %= (bufferCount + 1); // + 1 because we need one temporary buffer
|
||||||
HRESULT hr = FAudioSourceVoice_SubmitSourceBuffer(sVoice, &buf, NULL); // send buffer to queue.
|
uint32_t hr = FAudioSourceVoice_SubmitSourceBuffer(sVoice, &buf, NULL);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FAudio_Output::pause()
|
void FAudio_Output::pause()
|
||||||
|
@ -572,8 +565,8 @@ void FAudio_Output::pause()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (playing) {
|
if (playing) {
|
||||||
HRESULT hr = FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW);
|
uint32_t hr = FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
playing = false;
|
playing = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -584,8 +577,8 @@ void FAudio_Output::resume()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!playing) {
|
if (!playing) {
|
||||||
HRESULT hr = FAudioSourceVoice_Start(sVoice, 0, FAUDIO_COMMIT_NOW);
|
uint32_t hr = FAudioSourceVoice_Start(sVoice, 0, FAUDIO_COMMIT_NOW);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
playing = true;
|
playing = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -596,8 +589,8 @@ void FAudio_Output::reset()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (playing) {
|
if (playing) {
|
||||||
HRESULT hr = FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW);
|
uint32_t hr = FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
FAudioSourceVoice_FlushSourceBuffers(sVoice);
|
FAudioSourceVoice_FlushSourceBuffers(sVoice);
|
||||||
|
@ -613,8 +606,8 @@ void FAudio_Output::setThrottle(unsigned short throttle_)
|
||||||
if (throttle_ == 0)
|
if (throttle_ == 0)
|
||||||
throttle_ = 100;
|
throttle_ = 100;
|
||||||
|
|
||||||
HRESULT hr = FAudioSourceVoice_SetFrequencyRatio(sVoice, (float)throttle_ / 100.0f, FAUDIO_MAX_FILTER_FREQUENCY);
|
uint32_t hr = FAudioSourceVoice_SetFrequencyRatio(sVoice, (float)throttle_ / 100.0f, FAUDIO_MAX_FILTER_FREQUENCY);
|
||||||
assert(hr == S_OK);
|
assert(hr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void faudio_device_changed(FAudio_Output* instance)
|
void faudio_device_changed(FAudio_Output* instance)
|
||||||
|
|
|
@ -2612,18 +2612,18 @@ bool MainFrame::BindControls()
|
||||||
d->Fit();
|
d->Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
d = LoadXRCDialog("UIConfig");
|
wxMenuItem* suspend_scr_saver_mi = XRCITEM("SuspendScreenSaver");
|
||||||
{ getcbb("HideMenuBar", gopts.hide_menu_bar); }
|
if (suspend_scr_saver_mi)
|
||||||
{
|
{
|
||||||
getcbb("SuspendScreenSaver", gopts.suspend_screensaver);
|
// TODO: change preprocessor directive to fit other platforms
|
||||||
// TODO: change preprocessor directive to fit other platforms
|
|
||||||
#if !defined(HAVE_XSS)
|
#if !defined(HAVE_XSS)
|
||||||
cb->Hide();
|
suspend_scr_saver_mi->GetMenu()->Remove(suspend_scr_saver_mi);
|
||||||
#else
|
#else
|
||||||
if (wxGetApp().UsingWayland())
|
if (wxGetApp().UsingWayland())
|
||||||
cb->Hide();
|
suspend_scr_saver_mi->GetMenu()->Remove(suspend_scr_saver_mi);
|
||||||
#endif // !HAVE_XSS
|
#endif // !HAVE_XSS
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFilePickerCtrl* fp;
|
wxFilePickerCtrl* fp;
|
||||||
#define getfp(n, o, l) \
|
#define getfp(n, o, l) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -1900,14 +1900,14 @@ void DrawingPanelBase::DrawArea(uint8_t** data)
|
||||||
|
|
||||||
// draw OSD text old-style (directly into output buffer), if needed
|
// draw OSD text old-style (directly into output buffer), if needed
|
||||||
// new style flickers too much, so we'll stick to this for now
|
// new style flickers too much, so we'll stick to this for now
|
||||||
if (wxGetApp().frame->IsFullScreen() || !OPTION(kGenStatusBar)) {
|
if (wxGetApp().frame->IsFullScreen() || !OPTION(kPrefDisableStatus)) {
|
||||||
GameArea* panel = wxGetApp().frame->GetPanel();
|
GameArea* panel = wxGetApp().frame->GetPanel();
|
||||||
|
|
||||||
if (panel->osdstat.size())
|
if (panel->osdstat.size())
|
||||||
drawText(todraw + outstride * (systemColorDepth != 24), outstride,
|
drawText(todraw + outstride * (systemColorDepth != 24), outstride,
|
||||||
10, 20, UTF8(panel->osdstat), OPTION(kPrefShowSpeedTransparent));
|
10, 20, UTF8(panel->osdstat), OPTION(kPrefShowSpeedTransparent));
|
||||||
|
|
||||||
if (!OPTION(kPrefDisableStatus) && !panel->osdtext.empty()) {
|
if (!panel->osdtext.empty()) {
|
||||||
if (systemGetClock() - panel->osdtime < OSD_TIME) {
|
if (systemGetClock() - panel->osdtime < OSD_TIME) {
|
||||||
wxString message = panel->osdtext;
|
wxString message = panel->osdtext;
|
||||||
int linelen = std::ceil(width * scale - 20) / 8;
|
int linelen = std::ceil(width * scale - 20) / 8;
|
||||||
|
|
|
@ -368,10 +368,6 @@
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
</object>
|
</object>
|
||||||
<object class="separator"/>
|
<object class="separator"/>
|
||||||
<object class="wxMenuItem" name="StatusBar">
|
|
||||||
<label>_Status bar</label>
|
|
||||||
<checkable>1</checkable>
|
|
||||||
</object>
|
|
||||||
<object class="wxMenuItem" name="NoStatusMsg">
|
<object class="wxMenuItem" name="NoStatusMsg">
|
||||||
<label>_Disable on-screen display</label>
|
<label>_Disable on-screen display</label>
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
|
@ -569,8 +565,20 @@
|
||||||
<object class="wxMenuItem" name="Customize">
|
<object class="wxMenuItem" name="Customize">
|
||||||
<label>_Key Shortcuts...</label>
|
<label>_Key Shortcuts...</label>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" name="UIConfigure">
|
<object class="wxMenu" name="UIConfigure">
|
||||||
<label>_UI Settings...</label>
|
<label>UI Settings</label>
|
||||||
|
<object class="wxMenuItem" name="StatusBar">
|
||||||
|
<label>Enable _Status bar</label>
|
||||||
|
<checkable>1</checkable>
|
||||||
|
</object>
|
||||||
|
<object class="wxMenuItem" name="HideMenuBar">
|
||||||
|
<label>Hide _Menu Bar</label>
|
||||||
|
<checkable>1</checkable>
|
||||||
|
</object>
|
||||||
|
<object class="wxMenuItem" name="SuspendScreenSaver">
|
||||||
|
<label>Suspend _Screen Saver</label>
|
||||||
|
<checkable>1</checkable>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenu">
|
<object class="wxMenu">
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
|
||||||
<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
|
|
||||||
<object class="wxDialog" name="UIConfig">
|
|
||||||
<title>User Interface Settings</title>
|
|
||||||
<object class="wxBoxSizer">
|
|
||||||
<orient>wxVERTICAL</orient>
|
|
||||||
<object class="sizeritem">
|
|
||||||
<object class="wxCheckBox" name="HideMenuBar">
|
|
||||||
<label>Hide Menu Bar</label>
|
|
||||||
</object>
|
|
||||||
<flag>wxALL</flag>
|
|
||||||
<border>5</border>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem">
|
|
||||||
<object class="wxCheckBox" name="SuspendScreenSaver">
|
|
||||||
<label>Suspend ScreenSaver</label>
|
|
||||||
</object>
|
|
||||||
<flag>wxALL</flag>
|
|
||||||
<border>5</border>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem">
|
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
|
||||||
<border>5</border>
|
|
||||||
<object class="wxStdDialogButtonSizer">
|
|
||||||
<object class="button">
|
|
||||||
<object class="wxButton" name="wxID_OK"/>
|
|
||||||
</object>
|
|
||||||
<object class="button">
|
|
||||||
<object class="wxButton" name="wxID_CANCEL"/>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</resource>
|
|
Loading…
Reference in New Issue