mirror of
https://github.com/glest/glest-source.git
synced 2025-08-15 21:04:00 +02:00
- ported bugfixes to trunk from 3.6.0.3
This commit is contained in:
@@ -500,6 +500,13 @@ void endPathWithSlash(string &path,bool requireOSSlash) {
|
||||
}
|
||||
}
|
||||
|
||||
string formatPath(string path) {
|
||||
replaceAll(path, "\"", "");
|
||||
replaceAll(path, "//", "/");
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
void trimPathWithStartingSlash(string &path) {
|
||||
if(StartsWith(path, "/") == true || StartsWith(path, "\\") == true) {
|
||||
path.erase(path.begin(),path.begin()+1);
|
||||
|
@@ -15,6 +15,11 @@
|
||||
#include "platform_common.h"
|
||||
#include "libircclient.h"
|
||||
|
||||
// upstream moved some defines into new headers as of 1.6
|
||||
#ifndef LIBIRCCLIENT_PRE1_6
|
||||
#include "libirc_rfcnumeric.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
@@ -79,11 +79,11 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
|
||||
#ifndef WIN32
|
||||
string mg_icon_file = "";
|
||||
#if defined(CUSTOM_DATA_INSTALL_PATH_VALUE)
|
||||
if(fileExists(CUSTOM_DATA_INSTALL_PATH_VALUE + "megaglest.png")) {
|
||||
mg_icon_file = CUSTOM_DATA_INSTALL_PATH_VALUE + "megaglest.png";
|
||||
if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.png")) {
|
||||
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.png";
|
||||
}
|
||||
else if(fileExists(CUSTOM_DATA_INSTALL_PATH_VALUE + "megaglest.bmp")) {
|
||||
mg_icon_file = CUSTOM_DATA_INSTALL_PATH_VALUE + "megaglest.bmp";
|
||||
else if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.bmp")) {
|
||||
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.bmp";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user