mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 17:45:31 -07:00
Add all fdd sound samples and sound profile configration file to assets/sounds/fdd
Updated configuration and sample loading from assets subfolder. Update CMakeLists.txt to include assets-folder in the build and install.
This commit is contained in:
@@ -215,9 +215,11 @@ endif()
|
||||
if(WIN32 OR (APPLE AND CMAKE_MACOSX_BUNDLE))
|
||||
# Copy the binary to the root of the install prefix on Windows and macOS
|
||||
install(TARGETS 86Box DESTINATION ".")
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/assets DESTINATION ".")
|
||||
else()
|
||||
# On Linux we want to copy the binary to the `bin` folder.
|
||||
install(TARGETS 86Box)
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/assets)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -288,3 +290,10 @@ endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||
add_custom_command(TARGET 86Box POST_BUILD COMMAND paxctl ARGS +m $<TARGET_FILE:86Box> COMMENT "Disable PaX MPROTECT")
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET 86Box POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/assets
|
||||
$<TARGET_FILE_DIR:86Box>/assets
|
||||
COMMENT "Copying assets directory to build output"
|
||||
)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <86box/fdd_audio.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
//#include <86box/rom.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/path.h>
|
||||
@@ -196,7 +196,7 @@ fdd_audio_load_profiles(void)
|
||||
{
|
||||
ini_t profiles_ini;
|
||||
|
||||
profiles_ini = ini_read_ex("roms/floppy/fdd_audio_profiles.cfg", 1);
|
||||
profiles_ini = ini_read_ex("assets/sounds/fdd/fdd_audio_profiles.cfg", 1);
|
||||
if (profiles_ini == NULL) {
|
||||
fdd_log("FDD Audio: Could not load profiles\n");
|
||||
return;
|
||||
@@ -669,7 +669,7 @@ load_wav(const char *filename, int *sample_count)
|
||||
if (strstr(filename, "..") != NULL)
|
||||
return NULL;
|
||||
|
||||
FILE *f = rom_fopen(filename, "rb");
|
||||
FILE *f = plat_fopen(filename, "rb");
|
||||
if (f == NULL) {
|
||||
fdd_log("FDD Audio: Failed to open WAV file: %s\n", filename);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user