Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: configure.ac
- ===================================================================
- --- configure.ac (revision 7541)
- +++ configure.ac (working copy)
- @@ -664,8 +664,8 @@
- if test x$enable_macosx_studio_support = xyes ; then
- enable_exult_studio_support=yes
- - SYSLIBS="$SYSLIBS -L/usr/X11R6/lib -lX11"
- - AC_DEFINE(XWIN, 1, [X11 (needed by Exult Studio support in Mac OS X)])
- + #SYSLIBS="$SYSLIBS -L/usr/X11R6/lib -lX11"
- + #AC_DEFINE(XWIN, 1, [X11 (needed by Exult Studio support in Mac OS X)])
- fi
- if test x$enable_exult_studio_support = xyes ; then
- Index: exult.cc
- ===================================================================
- --- exult.cc (revision 7541)
- +++ exult.cc (working copy)
- @@ -757,9 +757,11 @@
- RevokeDragDrop(hgwin);
- delete windnd;
- #else
- +#if defined(XWIN)
- delete xdnd;
- #endif
- #endif
- +#endif
- return result;
- }
- @@ -835,6 +837,7 @@
- // Maybe it would be best to use SDL_putenv instead?
- SDL_putenv(const_cast<char *>("SDL_VIDEO_CENTERED=center"));
- // Yes, SDL_putenv is GOOD. putenv does NOT work with wince. -PTG 2007/06/11
- +#if 0
- #elif defined(MACOSX) && defined(USE_EXULTSTUDIO)
- // Just in case:
- #ifndef XWIN
- @@ -844,6 +847,7 @@
- // SDL to use X11. Hence, we force the issue.
- SDL_putenv(const_cast<char *>("SDL_VIDEODRIVER=x11"));
- #endif
- +#endif
- #ifdef __IPHONEOS__
- init_flags |= SDL_INIT_JOYSTICK;
- #endif
- @@ -1047,6 +1051,7 @@
- #else
- SDL_GetWMInfo(&info);
- #endif
- +#if defined(XWIN)
- xfd = ConnectionNumber(info.info.x11.display);
- Server_init(); // Initialize server (for map-editor).
- #if SDL_VERSION_ATLEAST(2, 0, 0)
- @@ -1058,6 +1063,7 @@
- Move_dragged_shape, Move_dragged_combo,
- Drop_dragged_shape, Drop_dragged_chunk,
- Drop_dragged_npc, Drop_dragged_combo);
- +#endif
- #elif !defined(UNDER_CE)
- #if SDL_VERSION_ATLEAST(2, 0, 0)
- SDL_GetWindowWMInfo(gwin->get_win()->get_screen_window(), &info);
- @@ -1066,6 +1072,7 @@
- SDL_GetWMInfo(&info);
- hgwin = info.window;
- #endif
- +#if defined(XWIN)
- Server_init(); // Initialize server (for map-editor).
- OleInitialize(NULL);
- windnd = new Windnd(hgwin,
- @@ -1077,6 +1084,7 @@
- };
- #endif
- #endif
- +#endif
- }
- /*
- @@ -1256,7 +1264,7 @@
- */
- int last_x = -1, last_y = -1;
- while (!quitting_time) {
- -#ifdef USE_EXULTSTUDIO
- +#ifdef USE_EXULTSTUDIO && defined(XWIN)
- Server_delay(); // Handle requests.
- #else
- Delay(); // Wait a fraction of a second.
- @@ -1740,7 +1748,9 @@
- break;
- #ifdef USE_EXULTSTUDIO
- #ifndef WIN32
- +#if defined(XWIN)
- case SDL_SYSWMEVENT: {
- +
- #if SDL_VERSION_ATLEAST(2, 0, 0)
- XEvent &ev = event.syswm.msg->msg.x11.event;
- #else
- @@ -1754,6 +1764,7 @@
- }
- #endif
- #endif
- +#endif
- #if 0
- //#ifdef WIN32
- case SDL_SYSWMEVENT:
- Index: server/servemsg.cc
- ===================================================================
- --- server/servemsg.cc (revision 7541)
- +++ server/servemsg.cc (working copy)
- @@ -56,7 +56,7 @@
- unsigned char *data,
- int datalen
- ) {
- -#ifdef USE_EXULTSTUDIO
- +#ifdef USE_EXULTSTUDIO && defined(XWIN)
- unsigned char buf[maxlength + hdrlength];
- buf[0] = magic & 0xff; // Store magic (low-byte first).
- buf[1] = (magic >> 8) & 0xff;
- Index: server/server.cc
- ===================================================================
- --- server/server.cc (revision 7541)
- +++ server/server.cc (working copy)
- @@ -27,7 +27,7 @@
- #endif
- // only if compiled with "exult studio support"
- -#ifdef USE_EXULTSTUDIO
- +#ifdef USE_EXULTSTUDIO && defined(XWIN)
- #include <unistd.h>
- #ifndef UNDER_CE
- @@ -513,7 +513,7 @@
- void Server_delay(
- Message_handler handle_message
- ) {
- -#ifndef WIN32
- +#ifndef WIN32 && defined(XWIN)
- extern int xfd;
- fd_set rfds;
- struct timeval timer;
- @@ -571,9 +571,9 @@
- #endif
- }
- -
- +#if defined(XWIN)
- void Server_delay() {
- Server_delay(Handle_client_message);
- }
- -
- #endif
- +#endif
- Index: server/server.h
- ===================================================================
- --- server/server.h (revision 7541)
- +++ server/server.h (working copy)
- @@ -27,7 +27,7 @@
- /*
- * For the time being, we'll only inflict this on X users.
- */
- -#ifdef USE_EXULTSTUDIO
- +#ifdef USE_EXULTSTUDIO && defined(XWIN)
- typedef void(*Message_handler)(int &);
- Index: xdrag.cc
- ===================================================================
- --- xdrag.cc (revision 7541)
- +++ xdrag.cc (working copy)
- @@ -22,7 +22,7 @@
- # include <config.h>
- #endif
- -#if defined(USE_EXULTSTUDIO) && !defined(WIN32)
- +#if defined(USE_EXULTSTUDIO) && !defined(WIN32) && defined(XWIN)
- #include <iostream> /* Debugging messages */
- #include <X11/X.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement