fix up linux compiling
This commit is contained in:
parent
13fb9e8a2f
commit
e347ab6c90
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
u8 gba_header_data_0x04[156] = {
|
u8 gba_header_data_0x04[156] = {
|
||||||
|
@ -107,3 +108,37 @@ u32 strlen_ws(char *buf) // length without last spaces
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string RomName = ""; //Stores the name of the Rom currently loaded in memory
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Author: adelikat
|
||||||
|
* Date Added: May 8, 2009
|
||||||
|
* Description: Sets the Global variable RomName
|
||||||
|
* Known Usage:
|
||||||
|
* LoadRom
|
||||||
|
**/
|
||||||
|
void SetRomName(char *filename)
|
||||||
|
{
|
||||||
|
std::string str = filename;
|
||||||
|
|
||||||
|
//Truncate the path from filename
|
||||||
|
int x = str.find_last_of("/\\");
|
||||||
|
if (x > 0)
|
||||||
|
str = str.substr(x+1);
|
||||||
|
RomName = str;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Author: adelikat
|
||||||
|
* Date Added: May 8, 2009
|
||||||
|
* Description: Returns the Global variable RomName
|
||||||
|
* Known Usage:
|
||||||
|
* included in main.h
|
||||||
|
* ramwatch.cpp - SaveStrings
|
||||||
|
**/
|
||||||
|
|
||||||
|
const char *GetRomName()
|
||||||
|
{
|
||||||
|
return RomName.c_str();
|
||||||
|
}
|
|
@ -28,6 +28,9 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
extern u8 gba_header_data_0x04[156];
|
extern u8 gba_header_data_0x04[156];
|
||||||
|
const char* GetRomName(); //adelikat: return the name of the Rom currently loaded
|
||||||
|
void SetRomName(char *filename);
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
@ -83,8 +86,5 @@ extern u8 reverseBitsInByte(u8 x);
|
||||||
extern void removeCR(char *buf);
|
extern void removeCR(char *buf);
|
||||||
extern u32 strlen_ws(char *buf);
|
extern u32 strlen_ws(char *buf);
|
||||||
|
|
||||||
const char* GetRomName(); //adelikat: return the name of the Rom currently loaded
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "readwrite.h"
|
#include "readwrite.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
bool freshMovie = false; //True when a movie loads, false when movie is altered. Used to determine if a movie has been altered since opening
|
bool freshMovie = false; //True when a movie loads, false when movie is altered. Used to determine if a movie has been altered since opening
|
||||||
|
|
|
@ -100,11 +100,6 @@ const unsigned int baseid = IDM_RECENT_RESERVED1; //Base identifier for the re
|
||||||
static HMENU recentromsmenu; //Handle to the recent ROMs submenu
|
static HMENU recentromsmenu; //Handle to the recent ROMs submenu
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
|
|
||||||
//----RomName---------------------------
|
|
||||||
string RomName = ""; //Stores the name of the Rom currently loaded in memory
|
|
||||||
void SetRomName(char *filename);
|
|
||||||
//--------------------------------------
|
|
||||||
|
|
||||||
void UpdateHotkeyAssignments(); //Appends hotkey mappings to corresponding menu items
|
void UpdateHotkeyAssignments(); //Appends hotkey mappings to corresponding menu items
|
||||||
|
|
||||||
static HMENU mainMenu; //Holds handle to the main DeSmuME menu
|
static HMENU mainMenu; //Holds handle to the main DeSmuME menu
|
||||||
|
@ -4211,34 +4206,3 @@ void UpdateHotkeyAssignments()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
* Author: adelikat
|
|
||||||
* Date Added: May 8, 2009
|
|
||||||
* Description: Sets the Global variable RomName
|
|
||||||
* Known Usage:
|
|
||||||
* LoadRom
|
|
||||||
**/
|
|
||||||
void SetRomName(char *filename)
|
|
||||||
{
|
|
||||||
string str = filename;
|
|
||||||
|
|
||||||
//Truncate the path from filename
|
|
||||||
int x = str.find_last_of("/\\");
|
|
||||||
if (x > 0)
|
|
||||||
str = str.substr(x+1);
|
|
||||||
RomName = str;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***
|
|
||||||
* Author: adelikat
|
|
||||||
* Date Added: May 8, 2009
|
|
||||||
* Description: Returns the Global variable RomName
|
|
||||||
* Known Usage:
|
|
||||||
* included in main.h
|
|
||||||
* ramwatch.cpp - SaveStrings
|
|
||||||
**/
|
|
||||||
|
|
||||||
const char *GetRomName()
|
|
||||||
{
|
|
||||||
return RomName.c_str();
|
|
||||||
}
|
|
Loading…
Reference in New Issue