mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Network: Init Network in SDL and QT
This commit is contained in:
parent
77677e205e
commit
ebff5ba514
2 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,7 @@ set(HEADERS
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_directory_groups(${SRCS} ${HEADERS})
|
||||||
|
|
||||||
add_executable(citra ${SRCS} ${HEADERS})
|
add_executable(citra ${SRCS} ${HEADERS})
|
||||||
target_link_libraries(citra PRIVATE common core input_common)
|
target_link_libraries(citra PRIVATE common core input_common network)
|
||||||
target_link_libraries(citra PRIVATE inih glad)
|
target_link_libraries(citra PRIVATE inih glad)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(citra PRIVATE getopt)
|
target_link_libraries(citra PRIVATE getopt)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
#include "input_common/keyboard.h"
|
#include "input_common/keyboard.h"
|
||||||
#include "input_common/main.h"
|
#include "input_common/main.h"
|
||||||
|
#include "network/network.h"
|
||||||
|
|
||||||
void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) {
|
void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) {
|
||||||
TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0));
|
TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0));
|
||||||
|
@ -58,6 +59,7 @@ void EmuWindow_SDL2::OnResize() {
|
||||||
|
|
||||||
EmuWindow_SDL2::EmuWindow_SDL2() {
|
EmuWindow_SDL2::EmuWindow_SDL2() {
|
||||||
InputCommon::Init();
|
InputCommon::Init();
|
||||||
|
Network::Init();
|
||||||
|
|
||||||
motion_emu = std::make_unique<Motion::MotionEmu>(*this);
|
motion_emu = std::make_unique<Motion::MotionEmu>(*this);
|
||||||
|
|
||||||
|
@ -116,6 +118,8 @@ EmuWindow_SDL2::~EmuWindow_SDL2() {
|
||||||
SDL_GL_DeleteContext(gl_context);
|
SDL_GL_DeleteContext(gl_context);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
motion_emu = nullptr;
|
motion_emu = nullptr;
|
||||||
|
|
||||||
|
Network::Shutdown();
|
||||||
InputCommon::Shutdown();
|
InputCommon::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue