Fix: Memcard Manager dialog in Linux
Fix: IniFile's handling of CRLF in Linux git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2391 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d43c22b8dc
commit
cd93093cc8
|
@ -273,7 +273,7 @@ bool IniFile::Load(const char* filename)
|
||||||
|
|
||||||
sections.clear();
|
sections.clear();
|
||||||
sections.push_back(Section(""));
|
sections.push_back(Section(""));
|
||||||
//first section consists of the comments before the first real section
|
// first section consists of the comments before the first real section
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
std::ifstream in;
|
std::ifstream in;
|
||||||
|
@ -290,6 +290,14 @@ bool IniFile::Load(const char* filename)
|
||||||
in.getline(templine, MAX_BYTES);
|
in.getline(templine, MAX_BYTES);
|
||||||
std::string line = templine;
|
std::string line = templine;
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
// Check for CRLF eol and convert it to LF
|
||||||
|
if (!line.empty() && line.at(line.size()-1) == '\r')
|
||||||
|
{
|
||||||
|
line.erase(line.size()-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (in.eof())
|
if (in.eof())
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -243,7 +243,7 @@ void CISOProperties::CreateGUIControls()
|
||||||
//issues
|
//issues
|
||||||
sEmuIssues = new wxBoxSizer(wxHORIZONTAL);
|
sEmuIssues = new wxBoxSizer(wxHORIZONTAL);
|
||||||
EmuIssues = new wxTextCtrl(m_GameConfig,ID_EMU_ISSUES, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator);
|
EmuIssues = new wxTextCtrl(m_GameConfig,ID_EMU_ISSUES, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator);
|
||||||
EmuIssuesText = new wxStaticText(m_GameConfig,ID_EMUISSUES_TEXT,_("Emulation Issues(for when emustate is 'Problems'):"), wxDefaultPosition, wxDefaultSize);
|
EmuIssuesText = new wxStaticText(m_GameConfig,ID_EMUISSUES_TEXT,_("Emulation Issues (for when emustate is 'Problems'):"), wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
// Action Replay Cheats
|
// Action Replay Cheats
|
||||||
sbCheats = new wxStaticBoxSizer(wxVERTICAL, m_CheatPage, _("Action Replay Codes"));
|
sbCheats = new wxStaticBoxSizer(wxVERTICAL, m_CheatPage, _("Action Replay Codes"));
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "wx/mstream.h"
|
#include "wx/mstream.h"
|
||||||
//#define DEBUG_MCM true
|
//#define DEBUG_MCM true
|
||||||
#define DEFAULTS wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator
|
#define DEFAULTS wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator
|
||||||
#define ARROWS slot ? "" : ARROW[slot], slot ? ARROW[slot] : ""
|
#define ARROWS slot ? _T("") : ARROW[slot], slot ? ARROW[slot] : _T("")
|
||||||
|
|
||||||
const u8 hdr[] = {
|
const u8 hdr[] = {
|
||||||
0x42,0x4D,
|
0x42,0x4D,
|
||||||
|
@ -206,7 +206,7 @@ void CMemcardManager::CreateGUIControls()
|
||||||
{
|
{
|
||||||
// Create the controls for both memcards
|
// Create the controls for both memcards
|
||||||
|
|
||||||
char ARROW[2][3] = {{'<','-',0,}, {'-','>',0}};
|
const wxChar* ARROW[2] = {_T("<-"), _T("->")};
|
||||||
|
|
||||||
m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, wxT("Convert to GCI"), DEFAULTS);
|
m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, wxT("Convert to GCI"), DEFAULTS);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue