osd_get_emulator_directory removed (no credit)

This commit is contained in:
Miodrag Milanovic 2010-02-13 20:19:14 +00:00
parent a7eb1c4097
commit d63d1711eb
6 changed files with 0 additions and 81 deletions

View File

@ -849,18 +849,6 @@ osd_directory_entry *osd_stat(const char *path);
PATH INTERFACES
***************************************************************************/
/*-----------------------------------------------------------------------------
osd_get_emulator_directory: returns the path containing the emulator
Parameters:
dir - space to output directory
dir_size - size of path
-----------------------------------------------------------------------------*/
void osd_get_emulator_directory(char *dir, size_t dir_size);
/*-----------------------------------------------------------------------------
osd_get_full_path: retrieves the full path

View File

@ -64,10 +64,6 @@
// Global variables
//============================================================
#ifdef MESS
char sdl_cwd[512];
#endif
//============================================================
// Local variables
//============================================================
@ -284,9 +280,6 @@ int main(int argc, char *argv[])
#ifdef SDLMAME_OS2
MorphToPM();
#endif
#ifdef MESS
getcwd(sdl_cwd, 511);
#endif
#if defined(SDLMAME_X11) && (SDL_MAJOR_VERSION == 1) && (SDL_MINOR_VERSION == 2)
if (SDL_Linked_Version()->patch < 10)

View File

@ -389,12 +389,4 @@ file_error osd_get_full_path(char **dst, const char *path)
return err;
}
//============================================================
// osd_get_emulator_directory
//============================================================
extern char sdl_cwd[512];
void osd_get_emulator_directory(char *dir, size_t dir_size)
{
strncpy(dir, sdl_cwd, dir_size);
}
#endif

View File

@ -309,12 +309,4 @@ file_error osd_get_full_path(char **dst, const char *path)
return err;
}
//============================================================
// osd_get_emulator_directory
//============================================================
extern char sdl_cwd[512];
void osd_get_emulator_directory(char *dir, size_t dir_size)
{
strncpy(dir, sdl_cwd, dir_size);
}
#endif

View File

@ -553,37 +553,4 @@ done:
return err;
}
//============================================================
// win_get_module_file_name_utf8
//============================================================
static DWORD win_get_module_file_name_utf8(HMODULE module, char *filename, DWORD size)
{
TCHAR t_filename[MAX_PATH];
char *utf8_filename;
if (GetModuleFileName(module, t_filename, ARRAY_LENGTH(t_filename)) == 0)
return 0;
utf8_filename = utf8_from_tstring(t_filename);
if (!utf8_filename)
return 0;
size = (DWORD) snprintf(filename, size, "%s", utf8_filename);
free(utf8_filename);
return size;
}
//============================================================
// osd_get_emulator_directory
//============================================================
void osd_get_emulator_directory(char *dir, size_t dir_size)
{
char *s;
win_get_module_file_name_utf8(NULL, dir, dir_size);
s = strrchr(dir, '\\');
if (s)
s[1] = '\0';
}
#endif

View File

@ -520,16 +520,3 @@ const char *osd_get_volume_name(int idx)
return p;
}
//============================================================
// osd_get_emulator_directory
//============================================================
void osd_get_emulator_directory(char *dir, size_t dir_size)
{
char *s;
win_get_module_file_name_utf8(NULL, dir, dir_size);
s = strrchr(dir, '\\');
if (s)
s[1] = '\0';
}