Skip to content

Commit

Permalink
Added support for headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JCash authored and dapetcu21 committed Oct 20, 2020
1 parent d1512ab commit 085df92
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion defos/src/defos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#endif
#include <dmsdk/sdk.h>

#if defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_WINDOWS) || defined(DM_PLATFORM_HTML5) || defined(DM_PLATFORM_LINUX)
#if !defined(DM_HEADLESS) && (defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_WINDOWS) || defined(DM_PLATFORM_HTML5) || defined(DM_PLATFORM_LINUX))

#include "defos_private.h"
#include <stdlib.h>
Expand Down
7 changes: 2 additions & 5 deletions defos/src/defos_html5.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef DLIB_LOG_DOMAIN
#define DLIB_LOG_DOMAIN "defos"
#endif
#include <dmsdk/sdk.h>

#if defined(DM_PLATFORM_HTML5)
#if defined(DM_PLATFORM_HTML5) && !defined(DM_HEADLESS)

#include "defos_private.h"
#include <dmsdk/sdk.h>
#include <emscripten.h>
#include <stdlib.h>

Expand Down
6 changes: 3 additions & 3 deletions defos/src/defos_linux.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include <dmsdk/sdk.h>

#if defined(DM_PLATFORM_LINUX)
#if defined(DM_PLATFORM_LINUX) && !defined(DM_HEADLESS)

/*
some resources to manage window for x11.
Expand All @@ -17,6 +15,8 @@
setting the window icon
*/

#include <dmsdk/sdk.h>

#include "defos_private.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
Expand Down
7 changes: 2 additions & 5 deletions defos/src/defos_mac.mm
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef DLIB_LOG_DOMAIN
#define DLIB_LOG_DOMAIN "defos"
#endif
#include <dmsdk/sdk.h>

#if defined(DM_PLATFORM_OSX)
#if defined(DM_PLATFORM_OSX) && !defined(DM_HEADLESS)

#include "defos_private.h"
#include <dmsdk/sdk.h>
#include <AppKit/AppKit.h>
#include <IOKit/graphics/IOGraphicsLib.h>
#include <CoreGraphics/CoreGraphics.h>
Expand Down
5 changes: 3 additions & 2 deletions defos/src/defos_win.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

#if defined(DM_PLATFORM_WINDOWS) && !defined(DM_HEADLESS)

#include <dmsdk/sdk.h>
#include "defos_private.h"

#if defined(DM_PLATFORM_WINDOWS)

#include <atlbase.h>
#include <atlconv.h>
#include <WinUser.h>
Expand Down

0 comments on commit 085df92

Please sign in to comment.