Skip to content

Commit

Permalink
Fix bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Sep 24, 2019
1 parent e7b76e8 commit bfbe71b
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
17 changes: 12 additions & 5 deletions CMakeLists.txt
Expand Up @@ -178,7 +178,7 @@ add_library(devilution STATIC
Source/trigs.cpp
Source/wave.cpp)

add_executable(devilutionx MACOSX_BUNDLE
set(devilutionx_SRCS
SourceX/dx.cpp
SourceX/miniwin/misc.cpp
SourceX/miniwin/misc_io.cpp
Expand Down Expand Up @@ -210,10 +210,17 @@ add_executable(devilutionx MACOSX_BUNDLE
SourceX/DiabloUI/selhero.cpp
SourceX/DiabloUI/selyesno.cpp
SourceX/DiabloUI/title.cpp
SourceX/main.cpp
touch/touch.cpp
./Packaging/macOS/AppIcon.icns
./Packaging/resources/CharisSILB.ttf)
SourceX/main.cpp)

if(NOT USE_SDL1)
list(APPEND devilutionx_SRCS touch/touch.cpp)
endif()

if(APPLE)
list(APPEND devilutionx_SRCS ./Packaging/macOS/AppIcon.icns ./Packaging/resources/CharisSILB.ttf)
endif()

add_executable(devilutionx MACOSX_BUNDLE ${devilutionx_SRCS})

target_include_directories(devilution PUBLIC Source SourceS)
target_include_directories(devilutionx PRIVATE
Expand Down
6 changes: 2 additions & 4 deletions Source/diablo.cpp
Expand Up @@ -300,11 +300,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
if (ghMainWnd) {
Sleep(300);
DestroyWindow(ghMainWnd);
}
}
#else
svcOutputDebugString("ending",20);
}
#endif
}

return FALSE;
}
Expand Down
1 change: 1 addition & 0 deletions SourceX/DiabloUI/diabloui.cpp
Expand Up @@ -3,6 +3,7 @@
#include "stubs.h"
#include "utf8.h"
#include <string>
#include <algorithm>

#include "DiabloUI/diabloui.h"

Expand Down
3 changes: 3 additions & 0 deletions SourceX/miniwin/misc.cpp
Expand Up @@ -219,6 +219,9 @@ DWORD GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer)
SDL_free(base_path);

return strlen(lpBuffer);
#else
return 0;
#endif
}

DWORD GetLogicalDriveStringsA(DWORD nBufferLength, LPSTR lpBuffer)
Expand Down
1 change: 1 addition & 0 deletions SourceX/miniwin/misc_dx.cpp
Expand Up @@ -50,6 +50,7 @@ WINBOOL TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c)
SDL_WM_SetCaption(lpString, WINDOW_ICON_NAME);
#else
SDL_SetWindowTitle(window, lpString);
#endif
#endif

return true;
Expand Down
11 changes: 8 additions & 3 deletions SourceX/miniwin/misc_msg.cpp
Expand Up @@ -4,7 +4,9 @@
#include "devilution.h"
#include "stubs.h"
#include <math.h>
#include "../../touch/touch.h"
#ifndef SDL1
#include "../../touch/touch.h"
#endif
#ifdef SWITCH
#include <switch.h>
#endif
Expand Down Expand Up @@ -266,8 +268,10 @@ WINBOOL PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilter
// update joystick, touch mouse (and docking the Switch) at maximally 60 fps
currentTime = SDL_GetTicks();
if ((currentTime - lastTime) > 15) {
#ifndef SDL1
finish_simulated_mouse_clicks(MouseX, MouseY);
HandleJoystickAxes();
#endif
HandleJoystickAxes();
#ifdef SWITCH
HandleDocking();
#endif
Expand Down Expand Up @@ -305,8 +309,9 @@ WINBOOL PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilter
lpMsg->message = 0;
lpMsg->lParam = 0;
lpMsg->wParam = 0;

#ifndef SDL1
handle_touch(&e, MouseX, MouseY);
#endif
if (movie_playing) {
// allow plus button or mouse click to skip movie, no other input
switch (e.type) {
Expand Down
9 changes: 0 additions & 9 deletions makefile
Expand Up @@ -49,7 +49,6 @@ DEVILUTIONOBJ = \
obj/encrypt.o \
obj/engine.o \
obj/error.o \
obj/fault.o \
obj/gamemenu.o \
obj/gendung.o \
obj/gmenu.o \
Expand All @@ -61,7 +60,6 @@ DEVILUTIONOBJ = \
obj/items.o \
obj/lighting.o \
obj/loadsave.o \
obj/logging.o \
obj/mmainmenu.o \
obj/minitext.o \
obj/misdat.o \
Expand All @@ -70,7 +68,6 @@ DEVILUTIONOBJ = \
obj/monster.o \
obj/movie.o \
obj/mpqapi.o \
obj/msgcmd.o \
obj/msg.o \
obj/multi.o \
obj/nthread.o \
Expand Down Expand Up @@ -240,8 +237,6 @@ obj/engine.o: $(GLOBALDEPS) Source/engine.cpp
$(CXX) -c Source/engine.cpp -o obj/engine.o $(CXXFLAGS)
obj/error.o: $(GLOBALDEPS) Source/error.cpp
$(CXX) -c Source/error.cpp -o obj/error.o $(CXXFLAGS)
obj/fault.o: $(GLOBALDEPS) Source/fault.cpp
$(CXX) -c Source/fault.cpp -o obj/fault.o $(CXXFLAGS)
obj/gamemenu.o: $(GLOBALDEPS) Source/gamemenu.cpp
$(CXX) -c Source/gamemenu.cpp -o obj/gamemenu.o $(CXXFLAGS)
obj/gendung.o: $(GLOBALDEPS) Source/gendung.cpp
Expand All @@ -264,8 +259,6 @@ obj/lighting.o: $(GLOBALDEPS) Source/lighting.cpp
$(CXX) -c Source/lighting.cpp -o obj/lighting.o $(CXXFLAGS)
obj/loadsave.o: $(GLOBALDEPS) Source/loadsave.cpp
$(CXX) -c Source/loadsave.cpp -o obj/loadsave.o $(CXXFLAGS)
obj/logging.o: $(GLOBALDEPS) Source/logging.cpp
$(CXX) -c Source/logging.cpp -o obj/logging.o $(CXXFLAGS)
obj/mmainmenu.o: $(GLOBALDEPS) Source/mainmenu.cpp
$(CXX) -c Source/mainmenu.cpp -o obj/mmainmenu.o $(CXXFLAGS)
obj/minitext.o: $(GLOBALDEPS) Source/minitext.cpp
Expand All @@ -282,8 +275,6 @@ obj/movie.o: $(GLOBALDEPS) Source/movie.cpp
$(CXX) -c Source/movie.cpp -o obj/movie.o $(CXXFLAGS)
obj/mpqapi.o: $(GLOBALDEPS) Source/mpqapi.cpp
$(CXX) -c Source/mpqapi.cpp -o obj/mpqapi.o $(CXXFLAGS)
obj/msgcmd.o: $(GLOBALDEPS) Source/msgcmd.cpp
$(CXX) -c Source/msgcmd.cpp -o obj/msgcmd.o $(CXXFLAGS)
obj/msg.o: $(GLOBALDEPS) Source/msg.cpp
$(CXX) -c Source/msg.cpp -o obj/msg.o $(CXXFLAGS)
obj/multi.o: $(GLOBALDEPS) Source/multi.cpp
Expand Down

0 comments on commit bfbe71b

Please sign in to comment.