diff options
| author | 2017-07-08 18:42:14 +0200 | |
|---|---|---|
| committer | 2017-07-16 21:29:19 +0200 | |
| commit | ebff5ba5140f0b093facf95fd5a05e6c71384736 (patch) | |
| tree | 9d41dd7c44fd382fe96e36dfadcc680b2c40fdf8 /src | |
| parent | Network: Send JoinRequest and handle the answer in RoomMember (diff) | |
| download | yuzu-ebff5ba5140f0b093facf95fd5a05e6c71384736.tar.gz yuzu-ebff5ba5140f0b093facf95fd5a05e6c71384736.tar.xz yuzu-ebff5ba5140f0b093facf95fd5a05e6c71384736.zip | |
Network: Init Network in SDL and QT
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/citra/emu_window/emu_window_sdl2.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index d72d2b5f4..a885f22f8 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -16,7 +16,7 @@ set(HEADERS | |||
| 16 | create_directory_groups(${SRCS} ${HEADERS}) | 16 | create_directory_groups(${SRCS} ${HEADERS}) |
| 17 | 17 | ||
| 18 | add_executable(citra ${SRCS} ${HEADERS}) | 18 | add_executable(citra ${SRCS} ${HEADERS}) |
| 19 | target_link_libraries(citra PRIVATE common core input_common) | 19 | target_link_libraries(citra PRIVATE common core input_common network) |
| 20 | target_link_libraries(citra PRIVATE inih glad) | 20 | target_link_libraries(citra PRIVATE inih glad) |
| 21 | if (MSVC) | 21 | if (MSVC) |
| 22 | target_link_libraries(citra PRIVATE getopt) | 22 | target_link_libraries(citra PRIVATE getopt) |
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 47aadd60c..b0f808399 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "core/settings.h" | 16 | #include "core/settings.h" |
| 17 | #include "input_common/keyboard.h" | 17 | #include "input_common/keyboard.h" |
| 18 | #include "input_common/main.h" | 18 | #include "input_common/main.h" |
| 19 | #include "network/network.h" | ||
| 19 | 20 | ||
| 20 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { | 21 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { |
| 21 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); | 22 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); |
| @@ -58,6 +59,7 @@ void EmuWindow_SDL2::OnResize() { | |||
| 58 | 59 | ||
| 59 | EmuWindow_SDL2::EmuWindow_SDL2() { | 60 | EmuWindow_SDL2::EmuWindow_SDL2() { |
| 60 | InputCommon::Init(); | 61 | InputCommon::Init(); |
| 62 | Network::Init(); | ||
| 61 | 63 | ||
| 62 | motion_emu = std::make_unique<Motion::MotionEmu>(*this); | 64 | motion_emu = std::make_unique<Motion::MotionEmu>(*this); |
| 63 | 65 | ||
| @@ -116,6 +118,8 @@ EmuWindow_SDL2::~EmuWindow_SDL2() { | |||
| 116 | SDL_GL_DeleteContext(gl_context); | 118 | SDL_GL_DeleteContext(gl_context); |
| 117 | SDL_Quit(); | 119 | SDL_Quit(); |
| 118 | motion_emu = nullptr; | 120 | motion_emu = nullptr; |
| 121 | |||
| 122 | Network::Shutdown(); | ||
| 119 | InputCommon::Shutdown(); | 123 | InputCommon::Shutdown(); |
| 120 | } | 124 | } |
| 121 | 125 | ||