String::ToWideString wasn't returning a wide string...!

Enabled wide strings for Android ( i'll never target Android < 2.3 ).
EE_MAIN_FUNC is back, it was needed for the Android build ( i forgot about it ).
This commit is contained in:
Martín Lucas Golini
2013-08-29 02:01:59 -03:00
parent c1841d55a1
commit f09797c91c
12 changed files with 18 additions and 15 deletions

View File

@@ -281,7 +281,7 @@ class EE_API String {
** @return Converted wide string
** @see ToAnsiString, operator String
**/
String ToWideString() const;
std::wstring ToWideString() const;
#endif
/** Convert the string to a Utf8 string */

View File

@@ -98,16 +98,19 @@
#define EE_BACKEND_SDL_ACTIVE
#endif
#if EE_PLATFORM == EE_PLATFORM_ANDROID
#define EE_NO_WIDECHAR
#endif
#if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS
#if defined( EE_BACKEND_SDL_ACTIVE )
#define main SDL_main
#endif
#endif
#ifdef __cplusplus
#define EE_MAIN_FUNC extern "C"
#else
#define EE_MAIN_FUNC
#endif
#if EE_PLATFORM != EE_PLATFORM_ANDROID
#define EE_SUPPORT_EXCEPTIONS
#endif

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 2.8.0, 2013-08-24T19:48:17. -->
<!-- Written by QtCreator 2.8.0, 2013-08-29T01:59:58. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@@ -354,7 +354,7 @@ std::string String::ToAnsiString(const std::locale& locale) const
}
#ifndef EE_NO_WIDECHAR
String String::ToWideString() const
std::wstring String::ToWideString() const
{
// Prepare the output string
std::wstring output;

View File

@@ -1,6 +1,6 @@
#include <eepp/ee.hpp>
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Create a new window
cWindow * win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Empty Window" ) );

View File

@@ -81,7 +81,7 @@ void videoResize( cWindow * w ) {
}
using namespace Demo_ExternalShader;
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - External Shaders" ), ContextSettings( true ) );

View File

@@ -1,6 +1,6 @@
#include <eepp/ee.hpp>
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Create a new window
cWindow * win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Fonts" ), ContextSettings( true ) );

View File

@@ -608,7 +608,7 @@ void PhysicsDestroy() {
mDemo[ mCurDemo ].destroy();
}
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
mWindow = cEngine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - Physics" ), ContextSettings( true ) );

View File

@@ -55,7 +55,7 @@ void playMusic() {
}
/// Entry point of application
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Play a sound
playSound();

View File

@@ -26,7 +26,7 @@ void spriteCallback( Uint32 Event, cSprite * Sprite, void * UserData ) {
}
}
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Create a new window
cWindow * win = cEngine::instance()->CreateWindow( WindowSettings( 640, 480, "eepp - Sprites" ), ContextSettings( true ) );

View File

@@ -1,6 +1,6 @@
#include <eepp/ee.hpp>
int main (int argc, char * argv [])
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Create a new window
cWindow * win = cEngine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - VBO - FBO and Batch Rendering" ), ContextSettings( true ) );

View File

@@ -1945,7 +1945,7 @@ void cEETest::End() {
}
int main (int argc, char * argv []) {
EE_MAIN_FUNC int main (int argc, char * argv []) {
Demo_Test::cEETest * Test = eeNew( Demo_Test::cEETest, () );
Test->Process();