Skip to content

Commit

Permalink
[CI] First step on fixing Chrome build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Tufró committed May 15, 2013
1 parent 7287dc4 commit 08f97e1
Show file tree
Hide file tree
Showing 15 changed files with 285 additions and 284 deletions.
531 changes: 264 additions & 267 deletions scons/build.scons

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scons/src/MOAIApp.cpp → src/host-chrome/MOAIApp.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "moaicore/pch.h"
#include "moai-core/pch.h"
#include "geturl_handler.h"
#include "MOAIApp.h"
#include "moai_nacl.h"
Expand Down
2 changes: 1 addition & 1 deletion scons/src/MOAIApp.h → src/host-chrome/MOAIApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef MOAIAPP_H
#define MOAIAPP_H

#include "moaicore/moaicore.h"
#include "moai-core/headers.h"

class MOAIApp :
public MOAIGlobalClass < MOAIApp, MOAILuaObject > {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 10 additions & 6 deletions scons/src/NaClHost.cpp → src/host-chrome/NaClHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "geturl_handler.h"
#include "NaClFileSystem.h"
#include "opengl_context.h"
#include "moaicore/pch.h"
#include "moai-core/pch.h"
#include "moai_nacl.h"

#include <unistd.h>
Expand All @@ -24,8 +24,12 @@ extern "C" {
#include <lualib.h>
}

#include "zlcore/zlcore.h"
#include <moaicore/AKU.h>

#include "zl-vfs/pch.h"
#include <moai-core/headers.h>
#include <moai-core/host.h>
#include <moai-sim/headers.h>
#include <moai-sim/host.h>

#include "ppapi/gles2/gl2ext_ppapi.h"
#include <GLES2/gl2.h>
Expand All @@ -34,9 +38,9 @@ extern "C" {
#include "ppapi/cpp/size.h"
#include "ppapi/cpp/var.h"

#include <moaiext-fmod-ex/AKU-fmod-ex.h>
#include <moai-fmod-ex/host.h>

#include "moaicore/MOAIGfxDevice.h"
#include "moai-sim/MOAIGfxDevice.h"
#include "MOAIApp.h"

#include <lua-headers/moai_lua.h>
Expand Down Expand Up @@ -422,7 +426,7 @@ void MoaiInstance::DidChangeView ( const pp::Rect& position, const pp::Rect& cli
g_height = position.size ().height ();

//lazy init time
USDeviceTime::GetTimeInSeconds ();
ZLDeviceTime::GetTimeInSeconds ();

NACL_LOG ( "resize to %d, %d\n", position.size ().width (), position.size ().height () );

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scons/src/moai_nacl.h → src/host-chrome/moai_nacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ class NaClMoaiTimer {
#define SHIPPING 0
#define ENABLE_NACLPROFILE 0

#include "moaicore/pch.h"
#include "moai-core/pch.h"
#if SHIPPING
#define NACL_LOG(...)
#else
#define NACL_LOG(...) printf("%f:",USDeviceTime::GetTimeInSeconds ());printf(__VA_ARGS__)
#define NACL_LOG(...) printf("%f:",ZLDeviceTime::GetTimeInSeconds ());printf(__VA_ARGS__)
//#define NACL_LOG(...) printf(__VA_ARGS__)
#endif

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/moai-fmod-ex/MOAIFmodExChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void MOAIFmodExChannel::Play ( MOAIFmodExSound* sound, int loopCount ) {
FMOD_RESULT result;
FMOD::Channel* channel = 0;

//printf ( "PLAY SOUND %s, @ %f\n", sound->GetFileName (), USDeviceTime::GetTimeInSeconds () );
//printf ( "PLAY SOUND %s, @ %f\n", sound->GetFileName (), ZLDeviceTime::GetTimeInSeconds () );
result = soundSys->playSound ( FMOD_CHANNEL_FREE, sound->mSound, true, &channel );
if ( result != FMOD_OK ) {
printf (" FMOD ERROR: Sound did not play\n" );
Expand Down
12 changes: 6 additions & 6 deletions src/zl-util/ZLDeviceTime_nacl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
#include "pch.h"
#ifdef NACL

#include <uslscore/USDeviceTime.h>
#include <zl-util/ZLDeviceTime.h>
#include <time.h>
#include "moai_nacl.h"

namespace {
int g_CLOCKS_PER_SECOND = CLOCKS_PER_SEC;
double g_startClock;
double g_prevClock;
int g_USDeviceTimeInit = 0;
int g_ZLDeviceTimeInit = 0;
bool useTimeOfDay = false;
double getTimeOfDay () {

Expand All @@ -51,14 +51,14 @@ namespace {
}

//================================================================//
// USDeviceTime
// ZLDeviceTime
//================================================================//

//----------------------------------------------------------------//

double USDeviceTime::GetTimeInSeconds () {
double ZLDeviceTime::GetTimeInSeconds () {

if ( !g_USDeviceTimeInit ) {
if ( !g_ZLDeviceTimeInit ) {

//AJV extremely ugly hack to 'detect' unix systems or any other system where the default clock is wrong
//check out "clock() issues with beta SDK, chrome 15 vs 16" in the native client discuss Google group
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace {
g_prevClock = g_startClock;
//AJV End extremely ugly hack

g_USDeviceTimeInit = 1;
g_ZLDeviceTimeInit = 1;
}

double curclock = getClock ();
Expand Down

0 comments on commit 08f97e1

Please sign in to comment.