dominus

Untitled

Dec 25th, 2019
224
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: configure.ac
  2. ===================================================================
  3. --- configure.ac (revision 7541)
  4. +++ configure.ac (working copy)
  5. @@ -664,8 +664,8 @@
  6.  
  7. if test x$enable_macosx_studio_support = xyes ; then
  8. enable_exult_studio_support=yes
  9. - SYSLIBS="$SYSLIBS -L/usr/X11R6/lib -lX11"
  10. - AC_DEFINE(XWIN, 1, [X11 (needed by Exult Studio support in Mac OS X)])
  11. + #SYSLIBS="$SYSLIBS -L/usr/X11R6/lib -lX11"
  12. + #AC_DEFINE(XWIN, 1, [X11 (needed by Exult Studio support in Mac OS X)])
  13. fi
  14.  
  15. if test x$enable_exult_studio_support = xyes ; then
  16. Index: exult.cc
  17. ===================================================================
  18. --- exult.cc (revision 7541)
  19. +++ exult.cc (working copy)
  20. @@ -757,9 +757,11 @@
  21. RevokeDragDrop(hgwin);
  22. delete windnd;
  23. #else
  24. +#if defined(XWIN)
  25. delete xdnd;
  26. #endif
  27. #endif
  28. +#endif
  29.  
  30. return result;
  31. }
  32. @@ -835,6 +837,7 @@
  33. // Maybe it would be best to use SDL_putenv instead?
  34. SDL_putenv(const_cast<char *>("SDL_VIDEO_CENTERED=center"));
  35. // Yes, SDL_putenv is GOOD. putenv does NOT work with wince. -PTG 2007/06/11
  36. +#if 0
  37. #elif defined(MACOSX) && defined(USE_EXULTSTUDIO)
  38. // Just in case:
  39. #ifndef XWIN
  40. @@ -844,6 +847,7 @@
  41. // SDL to use X11. Hence, we force the issue.
  42. SDL_putenv(const_cast<char *>("SDL_VIDEODRIVER=x11"));
  43. #endif
  44. +#endif
  45. #ifdef __IPHONEOS__
  46. init_flags |= SDL_INIT_JOYSTICK;
  47. #endif
  48. @@ -1047,6 +1051,7 @@
  49. #else
  50. SDL_GetWMInfo(&info);
  51. #endif
  52. +#if defined(XWIN)
  53. xfd = ConnectionNumber(info.info.x11.display);
  54. Server_init(); // Initialize server (for map-editor).
  55. #if SDL_VERSION_ATLEAST(2, 0, 0)
  56. @@ -1058,6 +1063,7 @@
  57. Move_dragged_shape, Move_dragged_combo,
  58. Drop_dragged_shape, Drop_dragged_chunk,
  59. Drop_dragged_npc, Drop_dragged_combo);
  60. +#endif
  61. #elif !defined(UNDER_CE)
  62. #if SDL_VERSION_ATLEAST(2, 0, 0)
  63. SDL_GetWindowWMInfo(gwin->get_win()->get_screen_window(), &info);
  64. @@ -1066,6 +1072,7 @@
  65. SDL_GetWMInfo(&info);
  66. hgwin = info.window;
  67. #endif
  68. +#if defined(XWIN)
  69. Server_init(); // Initialize server (for map-editor).
  70. OleInitialize(NULL);
  71. windnd = new Windnd(hgwin,
  72. @@ -1077,6 +1084,7 @@
  73. };
  74. #endif
  75. #endif
  76. +#endif
  77. }
  78.  
  79. /*
  80. @@ -1256,7 +1264,7 @@
  81. */
  82. int last_x = -1, last_y = -1;
  83. while (!quitting_time) {
  84. -#ifdef USE_EXULTSTUDIO
  85. +#ifdef USE_EXULTSTUDIO && defined(XWIN)
  86. Server_delay(); // Handle requests.
  87. #else
  88. Delay(); // Wait a fraction of a second.
  89. @@ -1740,7 +1748,9 @@
  90. break;
  91. #ifdef USE_EXULTSTUDIO
  92. #ifndef WIN32
  93. +#if defined(XWIN)
  94. case SDL_SYSWMEVENT: {
  95. +
  96. #if SDL_VERSION_ATLEAST(2, 0, 0)
  97. XEvent &ev = event.syswm.msg->msg.x11.event;
  98. #else
  99. @@ -1754,6 +1764,7 @@
  100. }
  101. #endif
  102. #endif
  103. +#endif
  104. #if 0
  105. //#ifdef WIN32
  106. case SDL_SYSWMEVENT:
  107. Index: server/servemsg.cc
  108. ===================================================================
  109. --- server/servemsg.cc (revision 7541)
  110. +++ server/servemsg.cc (working copy)
  111. @@ -56,7 +56,7 @@
  112. unsigned char *data,
  113. int datalen
  114. ) {
  115. -#ifdef USE_EXULTSTUDIO
  116. +#ifdef USE_EXULTSTUDIO && defined(XWIN)
  117. unsigned char buf[maxlength + hdrlength];
  118. buf[0] = magic & 0xff; // Store magic (low-byte first).
  119. buf[1] = (magic >> 8) & 0xff;
  120. Index: server/server.cc
  121. ===================================================================
  122. --- server/server.cc (revision 7541)
  123. +++ server/server.cc (working copy)
  124. @@ -27,7 +27,7 @@
  125. #endif
  126.  
  127. // only if compiled with "exult studio support"
  128. -#ifdef USE_EXULTSTUDIO
  129. +#ifdef USE_EXULTSTUDIO && defined(XWIN)
  130.  
  131. #include <unistd.h>
  132. #ifndef UNDER_CE
  133. @@ -513,7 +513,7 @@
  134. void Server_delay(
  135. Message_handler handle_message
  136. ) {
  137. -#ifndef WIN32
  138. +#ifndef WIN32 && defined(XWIN)
  139. extern int xfd;
  140. fd_set rfds;
  141. struct timeval timer;
  142. @@ -571,9 +571,9 @@
  143. #endif
  144.  
  145. }
  146. -
  147. +#if defined(XWIN)
  148. void Server_delay() {
  149. Server_delay(Handle_client_message);
  150. }
  151. -
  152. #endif
  153. +#endif
  154. Index: server/server.h
  155. ===================================================================
  156. --- server/server.h (revision 7541)
  157. +++ server/server.h (working copy)
  158. @@ -27,7 +27,7 @@
  159. /*
  160. * For the time being, we'll only inflict this on X users.
  161. */
  162. -#ifdef USE_EXULTSTUDIO
  163. +#ifdef USE_EXULTSTUDIO && defined(XWIN)
  164.  
  165. typedef void(*Message_handler)(int &);
  166.  
  167. Index: xdrag.cc
  168. ===================================================================
  169. --- xdrag.cc (revision 7541)
  170. +++ xdrag.cc (working copy)
  171. @@ -22,7 +22,7 @@
  172. # include <config.h>
  173. #endif
  174.  
  175. -#if defined(USE_EXULTSTUDIO) && !defined(WIN32)
  176. +#if defined(USE_EXULTSTUDIO) && !defined(WIN32) && defined(XWIN)
  177.  
  178. #include <iostream> /* Debugging messages */
  179. #include <X11/X.h>
RAW Paste Data