Fix platform issues regarding charsets

* IMPORTANT: A new dependency is required, boost_locale, comes with boost 1.50.0 or later
* Copying and pasting special characters should now work
* Running otclient from filepaths with special characters should work now too
This commit is contained in:
Eduardo Bart
2013-01-08 18:45:27 -02:00
parent b52c52cd36
commit fdcad184f9
13 changed files with 238 additions and 181 deletions

View File

@@ -28,6 +28,7 @@
#include <framework/ui/uimanager.h>
#include <framework/graphics/graphics.h>
#include <framework/graphics/particlemanager.h>
#include <framework/graphics/texturemanager.h>
#include <framework/graphics/painter.h>
#ifdef FW_SOUND
@@ -36,7 +37,7 @@
GraphicalApplication g_app;
void GraphicalApplication::init(const std::vector<std::string>& args)
void GraphicalApplication::init(std::vector<std::string>& args)
{
Application::init(args);
@@ -78,14 +79,14 @@ void GraphicalApplication::terminate()
// destroy any remaining widget
g_ui.terminate();
Application::terminate();
m_terminated = false;
#ifdef FW_SOUND
// terminate sound
g_sounds.terminate();
#endif
Application::terminate();
m_terminated = false;
// terminate graphics
m_foreground = nullptr;
g_graphics.terminate();
@@ -106,16 +107,21 @@ void GraphicalApplication::run()
poll();
g_clock.update();
g_lua.callGlobalField("g_app", "onRun");
// show window
g_window.show();
// run the second poll
poll();
g_clock.update();
g_lua.callGlobalField("g_app", "onRun");
while(!m_stopping) {
// poll all events before rendering
poll();
if(g_window.isVisible()) {
// the otclient's screen consists of two panes
// the screen consists of two panes
// background pane - high updated and animated pane (where the game are stuff happens)
// foreground pane - steady pane with few animated stuff (UI)
bool redraw = false;