From 568acece6e98d9759e1184dbd0955c0fcdd58827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Mon, 7 Oct 2013 11:53:04 +0000 Subject: [PATCH] res tweak for web usage. --- test/meshviewer.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index 134112d5..efbb503d 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -24,9 +24,17 @@ using namespace lol; static int const TEXTURE_WIDTH = 256; +#define NO_NACL_EM (!__native_client__ && !EMSCRIPTEN) +#define NACL_EM (__native_client__ || EMSCRIPTEN) + #define R_M 1.f +#if NACL_EM +#define DEFAULT_WIDTH (770.f * R_M) +#define DEFAULT_HEIGHT (200.f * R_M) +#else #define DEFAULT_WIDTH (1200.f * R_M) #define DEFAULT_HEIGHT (400.f * R_M) +#endif //NACL_EM #define WIDTH ((float)Video::GetSize().x) #define HEIGHT ((float)Video::GetSize().y) #define SCREEN_W (10.f / WIDTH) @@ -48,9 +56,6 @@ static int const TEXTURE_WIDTH = 256; #define WITH_TEXTURE 0 -#define NO_NACL_EM (!__native_client__ && !EMSCRIPTEN) -#define NACL_EM (__native_client__ || EMSCRIPTEN) - #define HAS_KBOARD (m_input_usage & (1<