Skip to content

Commit

Permalink
Win32: Fixed build
Browse files Browse the repository at this point in the history
Also added deng_debug to CONFIG when configuring a debug build.
  • Loading branch information
skyjake committed Oct 4, 2011
1 parent 3454dd4 commit 421ac65
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doomsday/config.pri
Expand Up @@ -60,7 +60,7 @@ defineTest(doPostLink) {
CONFIG(debug, debug|release) {
echo(Debug build.)
DEFINES += _DEBUG
CONFIG += deng_rangecheck
CONFIG += deng_rangecheck deng_debug
} else {
echo(Release build.)
DEFINES += NDEBUG
Expand Down
12 changes: 10 additions & 2 deletions doomsday/dep_deng2.pri
@@ -1,9 +1,17 @@
# Build configuration for using libdeng2.
INCLUDEPATH += $$PWD/libdeng2/include

win32 {
deng_debug {
btype = "Debug"
} else {
btype = "Release"
}
}

# Use the appropriate library path.
exists($$OUT_PWD/../libdeng2): LIBS += -L../libdeng2
else:exists($$OUT_PWD/../../libdeng2): LIBS += -L../../libdeng2
exists($$OUT_PWD/../libdeng2/$$btype): LIBS += -L../libdeng2/$$btype
else:exists($$OUT_PWD/../../libdeng2/$$btype): LIBS += -L../../libdeng2/$$btype

LIBS += -ldeng2

Expand Down
5 changes: 3 additions & 2 deletions doomsday/engine/portable/src/dd_loop.c
Expand Up @@ -70,7 +70,7 @@ void Net_ResetTimer(void);
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------

void DD_RunTics(void);
int DD_GameLoopCallback(void);
void DD_GameLoopCallback(void);

// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------

Expand Down Expand Up @@ -134,7 +134,7 @@ int DD_GameLoop(void)
/**
* This gets called periodically from the deng2 application core.
*/
int DD_GameLoopCallback(void)
void DD_GameLoopCallback(void)
{
int exitCode = 0;
#ifdef WIN32
Expand All @@ -145,6 +145,7 @@ int DD_GameLoopCallback(void)
{
// Time to stop the loop.
LegacyCore_Stop(de2LegacyCore, exitCode);
return;
}

#ifdef WIN32
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/win32/src/dd_winit.c
Expand Up @@ -317,7 +317,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,

// Prepare arguments for LegacyCore.
legacyArgc = 1;
legacyArgs[0] = Argv(0);
legacyArgs[0] = (char*) Argv(0);
de2LegacyCore = LegacyCore_New(&legacyArgc, legacyArgs);

// First order of business: are we running in dedicated mode?
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libdeng2/include/de/c_wrapper.h
Expand Up @@ -38,7 +38,7 @@ extern "C" {
DENG2_OPAQUE(LegacyCore)

DENG2_PUBLIC LegacyCore* LegacyCore_New(int* argc, char** argv);
DENG2_PUBLIC int LegacyCore_RunEventLoop(LegacyCore* lc, int (*loopFunc)(void));
DENG2_PUBLIC int LegacyCore_RunEventLoop(LegacyCore* lc, void (*loopFunc)(void));
DENG2_PUBLIC void LegacyCore_Stop(LegacyCore* lc, int exitCode);
DENG2_PUBLIC void LegacyCore_Delete(LegacyCore* lc);

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libdeng2/include/de/legacy/legacycore.h
Expand Up @@ -51,7 +51,7 @@ class LegacyCore : public QObject
* Starts the libdeng2 kernel. A deng2 event loop is started in a separate
* thread, where deng2-specific events are handled.
*/
int runEventLoop(int (*callback)(void));
int runEventLoop(void (*callback)(void));

/**
* Stops the kernel. This is automatically called when the core is
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libdeng2/src/c_wrapper.cpp
Expand Up @@ -25,7 +25,7 @@ LegacyCore* LegacyCore_New(int* argc, char** argv)
return reinterpret_cast<LegacyCore*>(new de::LegacyCore(*argc, argv));
}

int LegacyCore_RunEventLoop(LegacyCore* lc, int (*loopFunc)(void))
int LegacyCore_RunEventLoop(LegacyCore* lc, void (*loopFunc)(void))
{
DENG2_SELF(LegacyCore, lc);
return self->runEventLoop(loopFunc);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/libdeng2/src/legacy/legacycore.cpp
Expand Up @@ -56,7 +56,7 @@ struct LegacyCore::Instance
{
QCoreApplication* app;
//CoreEventThread* thread;
int (*func)(void);
void (*func)(void);

Instance() : app(0), func(0) {}
~Instance() {
Expand All @@ -80,7 +80,7 @@ LegacyCore::~LegacyCore()
delete d;
}

int LegacyCore::runEventLoop(int (*func)(void))
int LegacyCore::runEventLoop(void (*func)(void))
{
qDebug() << "LegacyCore: Starting event loop...";

Expand Down

0 comments on commit 421ac65

Please sign in to comment.