summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra/CMakeLists.txt5
-rw-r--r--src/citra/citra.cpp40
-rw-r--r--src/core/hle/applets/applet.cpp9
-rw-r--r--src/core/hle/applets/applet.h6
-rw-r--r--src/core/hle/applets/swkbd.cpp8
-rw-r--r--src/core/hle/applets/swkbd.h3
-rw-r--r--src/core/hle/kernel/kernel.h1
-rw-r--r--src/core/hle/kernel/process.h1
-rw-r--r--src/core/hle/kernel/shared_memory.h3
-rw-r--r--src/core/hle/service/apt/apt.h9
10 files changed, 75 insertions, 10 deletions
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt
index 5e8cbfa35..918687312 100644
--- a/src/citra/CMakeLists.txt
+++ b/src/citra/CMakeLists.txt
@@ -16,8 +16,11 @@ create_directory_groups(${SRCS} ${HEADERS})
add_executable(citra ${SRCS} ${HEADERS})
target_link_libraries(citra core common video_core)
target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih)
+if (MSVC)
+ target_link_libraries(citra getopt)
+endif()
target_link_libraries(citra ${PLATFORM_LIBRARIES})
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD")
install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
-endif()
+endif() \ No newline at end of file
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp
index a59726c78..182646f4c 100644
--- a/src/citra/citra.cpp
+++ b/src/citra/citra.cpp
@@ -3,6 +3,15 @@
// Refer to the license.txt file included.
#include <string>
+#include <thread>
+#include <iostream>
+
+#ifdef _MSC_VER
+#include <getopt.h>
+#else
+#include <unistd.h>
+#include <getopt.h>
+#endif
#include "common/logging/log.h"
#include "common/logging/backend.h"
@@ -18,12 +27,39 @@
#include "video_core/video_core.h"
+
+static void PrintHelp()
+{
+ std::cout << "Usage: citra <filename>" << std::endl;
+}
+
/// Application entry point
int main(int argc, char **argv) {
+ int option_index = 0;
+ std::string boot_filename;
+ static struct option long_options[] = {
+ { "help", no_argument, 0, 'h' },
+ { 0, 0, 0, 0 }
+ };
+
+ while (optind < argc) {
+ char arg = getopt_long(argc, argv, ":h", long_options, &option_index);
+ if (arg != -1) {
+ switch (arg) {
+ case 'h':
+ PrintHelp();
+ return 0;
+ }
+ } else {
+ boot_filename = argv[optind];
+ optind++;
+ }
+ }
+
Log::Filter log_filter(Log::Level::Debug);
Log::SetFilter(&log_filter);
- if (argc < 2) {
+ if (boot_filename.empty()) {
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
return -1;
}
@@ -31,7 +67,7 @@ int main(int argc, char **argv) {
Config config;
log_filter.ParseFilterString(Settings::values.log_filter);
- std::string boot_filename = argv[1];
+
EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
VideoCore::g_hw_renderer_enabled = Settings::values.use_hw_renderer;
diff --git a/src/core/hle/applets/applet.cpp b/src/core/hle/applets/applet.cpp
index 4dcce729a..826f6cbb6 100644
--- a/src/core/hle/applets/applet.cpp
+++ b/src/core/hle/applets/applet.cpp
@@ -2,12 +2,19 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <cstddef>
+#include <memory>
+#include <type_traits>
+#include <unordered_map>
+
#include "common/assert.h"
-#include "common/logging/log.h"
+#include "common/common_types.h"
#include "core/core_timing.h"
#include "core/hle/applets/applet.h"
#include "core/hle/applets/swkbd.h"
+#include "core/hle/result.h"
+#include "core/hle/service/apt/apt.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/applets/applet.h b/src/core/hle/applets/applet.h
index fe537e70d..b235d0b8a 100644
--- a/src/core/hle/applets/applet.h
+++ b/src/core/hle/applets/applet.h
@@ -4,9 +4,9 @@
#pragma once
-#include "common/common_types.h"
-#include "core/hle/kernel/kernel.h"
-#include "core/hle/kernel/shared_memory.h"
+#include <memory>
+
+#include "core/hle/result.h"
#include "core/hle/service/apt/apt.h"
namespace HLE {
diff --git a/src/core/hle/applets/swkbd.cpp b/src/core/hle/applets/swkbd.cpp
index 7431ebcf8..1db6b5a17 100644
--- a/src/core/hle/applets/swkbd.cpp
+++ b/src/core/hle/applets/swkbd.cpp
@@ -2,13 +2,21 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <cstring>
+#include <string>
+
#include "common/assert.h"
#include "common/logging/log.h"
#include "common/string_util.h"
#include "core/hle/applets/swkbd.h"
+#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/gsp_gpu.h"
+#include "core/hle/result.h"
+#include "core/memory.h"
+
#include "video_core/video_core.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/applets/swkbd.h b/src/core/hle/applets/swkbd.h
index 98e81c48a..cb95b8d90 100644
--- a/src/core/hle/applets/swkbd.h
+++ b/src/core/hle/applets/swkbd.h
@@ -5,9 +5,12 @@
#pragma once
#include "common/common_types.h"
+#include "common/common_funcs.h"
+
#include "core/hle/applets/applet.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/shared_memory.h"
+#include "core/hle/result.h"
#include "core/hle/service/apt/apt.h"
namespace HLE {
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 4c4486c19..4d4276f7a 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -86,6 +86,7 @@ public:
case HandleType::Process:
case HandleType::AddressArbiter:
case HandleType::ResourceLimit:
+ case HandleType::CodeSet:
return false;
}
}
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 92fa0fa6f..83d3aceae 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -6,6 +6,7 @@
#include <bitset>
#include <cstddef>
+#include <memory>
#include <string>
#include <boost/container/static_vector.hpp>
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h
index 204266896..7a2922776 100644
--- a/src/core/hle/kernel/shared_memory.h
+++ b/src/core/hle/kernel/shared_memory.h
@@ -4,9 +4,12 @@
#pragma once
+#include <string>
+
#include "common/common_types.h"
#include "core/hle/kernel/kernel.h"
+#include "core/hle/result.h"
namespace Kernel {
diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h
index 9f0802508..72972d05b 100644
--- a/src/core/hle/service/apt/apt.h
+++ b/src/core/hle/service/apt/apt.h
@@ -4,11 +4,14 @@
#pragma once
-#include <array>
-#include "core/hle/result.h"
-#include "core/hle/service/service.h"
+#include "common/common_types.h"
+
+#include "core/hle/kernel/kernel.h"
namespace Service {
+
+class Interface;
+
namespace APT {
/// Holds information about the parameters used in Send/Glance/ReceiveParameter