Commit 36f695e1 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanup non-libretro paths

parent b85f887b
Pipeline #67345 passed with stages
in 11 minutes and 29 seconds
......@@ -410,13 +410,6 @@ static const uint8_t lfo_noise_waveform[256] = {
0xE2,0x4D,0x8A,0xA6,0x46,0x95,0x0F,0x8F,0xF5,0x15,0x97,0x32,0xD4,0x28,0x1E,0x55
};
/* save output as raw 16-bit sample */
/* #define SAVE_SAMPLE */
/* #define SAVE_SEPARATE_CHANNELS */
#if defined SAVE_SAMPLE || defined SAVE_SEPARATE_CHANNELS
static FILE *sample[9];
#endif
YM2151::YM2151(float volume, uint32_t clock)
{
this->volume = volume;
......@@ -498,20 +491,6 @@ void YM2151::init_tables()
d1l_tab[i] = (uint32_t) m;
/*logerror("d1l_tab[%02x]=%08x\n",i,d1l_tab[i] );*/
}
#ifdef SAVE_SAMPLE
sample[8]=fopen("sampsum.pcm","wb");
#endif
#ifdef SAVE_SEPARATE_CHANNELS
sample[0]=fopen("samp0.pcm","wb");
sample[1]=fopen("samp1.pcm","wb");
sample[2]=fopen("samp2.pcm","wb");
sample[3]=fopen("samp3.pcm","wb");
sample[4]=fopen("samp4.pcm","wb");
sample[5]=fopen("samp5.pcm","wb");
sample[6]=fopen("samp6.pcm","wb");
sample[7]=fopen("samp7.pcm","wb");
#endif
}
......
......@@ -16,11 +16,7 @@
#include "stdint.hpp"
#include "romloader.hpp"
#ifdef __LIBRETRO__
#include <libretro.h>
#elif defined(__APPLE__)
#include "CoreFoundation/CoreFoundation.h"
#endif
RomLoader::RomLoader()
{
......@@ -44,32 +40,10 @@ void RomLoader::unload(void)
int RomLoader::load(const char* filename, const int offset, const int length, const int expected_crc, const uint8_t interleave)
{
#if defined(__LIBRETRO__)
extern retro_environment_t environ_cb;
extern char rom_path[1024];
const char *dir = NULL;
std::string path;
path = std::string(rom_path);
#else
#if defined(__APPLE__) && !defined(__LIBRETRO__)
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
char bundlepath[PATH_MAX];
if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)bundlepath, PATH_MAX))
{
// error!
}
CFRelease(resourcesURL);
chdir(bundlepath);
#endif
std::string path = "roms/";
#endif
path += std::string(filename);
const char *dir = NULL;
std::string path = std::string(rom_path) + std::string(filename);
// Open rom file
std::ifstream src(path.c_str(), std::ios::in | std::ios::binary);
if (!src)
......@@ -109,20 +83,6 @@ int RomLoader::load(const char* filename, const int offset, const int length, co
// Load Binary File (LayOut Levels, Tilemap Data etc.)
int RomLoader::load_binary(const char* filename)
{
#if defined(__APPLE__) && !defined(__LIBRETRO__)
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
char bundlepath[PATH_MAX];
if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)bundlepath, PATH_MAX))
{
// error!
}
CFRelease(resourcesURL);
chdir(bundlepath);
#endif
// --------------------------------------------------------------------------------------------
// Read LayOut Data File
// --------------------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment