Skip to content

Commit

Permalink
Add fscompat.h
Browse files Browse the repository at this point in the history
  • Loading branch information
bearoso committed Mar 7, 2023
1 parent c69552c commit 600b628
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fscompat.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*****************************************************************************\
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
This file is licensed under the Snes9x License.
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/

#include <cstring>
#include <string>

Expand Down
50 changes: 50 additions & 0 deletions fscompat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*****************************************************************************\
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
This file is licensed under the Snes9x License.
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/

#pragma once

#include <string>

enum s9x_getdirtype
{
DEFAULT_DIR = 0,
HOME_DIR,
ROMFILENAME_DIR,
ROM_DIR,
SRAM_DIR,
SNAPSHOT_DIR,
SCREENSHOT_DIR,
SPC_DIR,
CHEAT_DIR,
PATCH_DIR,
BIOS_DIR,
LOG_DIR,
SAT_DIR,
LAST_DIR
};

struct SplitPath
{
bool ext_is(const std::string &ext);
std::string drive;
std::string dir;
std::string stem;
std::string ext;
};

SplitPath splitpath(std::string filename);
std::string makepath(const std::string &drive,
const std::string &directory,
const std::string &stem,
const std::string &extension);
std::string makepath(const SplitPath &);

std::string S9xBasename (std::string);
std::string S9xBasenameNoExt (std::string);
std::string S9xGetFilename (std::string ext, enum s9x_getdirtype dirtype);
std::string S9xGetFilename (std::string filename, std::string ext, enum s9x_getdirtype dirtype);
std::string S9xGetDirectory (enum s9x_getdirtype);
std::string S9xGetFilenameInc (std::string, enum s9x_getdirtype);

0 comments on commit 600b628

Please sign in to comment.