summaryrefslogtreecommitdiff
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})
16add_executable(citra ${SRCS} ${HEADERS}) 16add_executable(citra ${SRCS} ${HEADERS})
17target_link_libraries(citra core common video_core) 17target_link_libraries(citra core common video_core)
18target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih) 18target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih)
19if (MSVC)
20 target_link_libraries(citra getopt)
21endif()
19target_link_libraries(citra ${PLATFORM_LIBRARIES}) 22target_link_libraries(citra ${PLATFORM_LIBRARIES})
20 23
21if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD") 24if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD")
22 install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") 25 install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
23endif() 26endif() \ 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 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <string> 5#include <string>
6#include <thread>
7#include <iostream>
8
9#ifdef _MSC_VER
10#include <getopt.h>
11#else
12#include <unistd.h>
13#include <getopt.h>
14#endif
6 15
7#include "common/logging/log.h" 16#include "common/logging/log.h"
8#include "common/logging/backend.h" 17#include "common/logging/backend.h"
@@ -18,12 +27,39 @@
18 27
19#include "video_core/video_core.h" 28#include "video_core/video_core.h"
20 29
30
31static void PrintHelp()
32{
33 std::cout << "Usage: citra <filename>" << std::endl;
34}
35
21/// Application entry point 36/// Application entry point
22int main(int argc, char **argv) { 37int main(int argc, char **argv) {
38 int option_index = 0;
39 std::string boot_filename;
40 static struct option long_options[] = {
41 { "help", no_argument, 0, 'h' },
42 { 0, 0, 0, 0 }
43 };
44
45 while (optind < argc) {
46 char arg = getopt_long(argc, argv, ":h", long_options, &option_index);
47 if (arg != -1) {
48 switch (arg) {
49 case 'h':
50 PrintHelp();
51 return 0;
52 }
53 } else {
54 boot_filename = argv[optind];
55 optind++;
56 }
57 }
58
23 Log::Filter log_filter(Log::Level::Debug); 59 Log::Filter log_filter(Log::Level::Debug);
24 Log::SetFilter(&log_filter); 60 Log::SetFilter(&log_filter);
25 61
26 if (argc < 2) { 62 if (boot_filename.empty()) {
27 LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); 63 LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
28 return -1; 64 return -1;
29 } 65 }
@@ -31,7 +67,7 @@ int main(int argc, char **argv) {
31 Config config; 67 Config config;
32 log_filter.ParseFilterString(Settings::values.log_filter); 68 log_filter.ParseFilterString(Settings::values.log_filter);
33 69
34 std::string boot_filename = argv[1]; 70
35 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; 71 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
36 72
37 VideoCore::g_hw_renderer_enabled = Settings::values.use_hw_renderer; 73 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 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstddef>
6#include <memory>
7#include <type_traits>
8#include <unordered_map>
9
5#include "common/assert.h" 10#include "common/assert.h"
6#include "common/logging/log.h" 11#include "common/common_types.h"
7 12
8#include "core/core_timing.h" 13#include "core/core_timing.h"
9#include "core/hle/applets/applet.h" 14#include "core/hle/applets/applet.h"
10#include "core/hle/applets/swkbd.h" 15#include "core/hle/applets/swkbd.h"
16#include "core/hle/result.h"
17#include "core/hle/service/apt/apt.h"
11 18
12//////////////////////////////////////////////////////////////////////////////////////////////////// 19////////////////////////////////////////////////////////////////////////////////////////////////////
13 20
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 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common/common_types.h" 7#include <memory>
8#include "core/hle/kernel/kernel.h" 8
9#include "core/hle/kernel/shared_memory.h" 9#include "core/hle/result.h"
10#include "core/hle/service/apt/apt.h" 10#include "core/hle/service/apt/apt.h"
11 11
12namespace HLE { 12namespace 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 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstring>
6#include <string>
7
5#include "common/assert.h" 8#include "common/assert.h"
6#include "common/logging/log.h" 9#include "common/logging/log.h"
7#include "common/string_util.h" 10#include "common/string_util.h"
8 11
9#include "core/hle/applets/swkbd.h" 12#include "core/hle/applets/swkbd.h"
13#include "core/hle/kernel/kernel.h"
14#include "core/hle/kernel/shared_memory.h"
10#include "core/hle/service/hid/hid.h" 15#include "core/hle/service/hid/hid.h"
11#include "core/hle/service/gsp_gpu.h" 16#include "core/hle/service/gsp_gpu.h"
17#include "core/hle/result.h"
18#include "core/memory.h"
19
12#include "video_core/video_core.h" 20#include "video_core/video_core.h"
13 21
14//////////////////////////////////////////////////////////////////////////////////////////////////// 22////////////////////////////////////////////////////////////////////////////////////////////////////
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 @@
5#pragma once 5#pragma once
6 6
7#include "common/common_types.h" 7#include "common/common_types.h"
8#include "common/common_funcs.h"
9
8#include "core/hle/applets/applet.h" 10#include "core/hle/applets/applet.h"
9#include "core/hle/kernel/kernel.h" 11#include "core/hle/kernel/kernel.h"
10#include "core/hle/kernel/shared_memory.h" 12#include "core/hle/kernel/shared_memory.h"
13#include "core/hle/result.h"
11#include "core/hle/service/apt/apt.h" 14#include "core/hle/service/apt/apt.h"
12 15
13namespace HLE { 16namespace 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:
86 case HandleType::Process: 86 case HandleType::Process:
87 case HandleType::AddressArbiter: 87 case HandleType::AddressArbiter:
88 case HandleType::ResourceLimit: 88 case HandleType::ResourceLimit:
89 case HandleType::CodeSet:
89 return false; 90 return false;
90 } 91 }
91 } 92 }
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 @@
6 6
7#include <bitset> 7#include <bitset>
8#include <cstddef> 8#include <cstddef>
9#include <memory>
9#include <string> 10#include <string>
10 11
11#include <boost/container/static_vector.hpp> 12#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 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <string>
8
7#include "common/common_types.h" 9#include "common/common_types.h"
8 10
9#include "core/hle/kernel/kernel.h" 11#include "core/hle/kernel/kernel.h"
12#include "core/hle/result.h"
10 13
11namespace Kernel { 14namespace Kernel {
12 15
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 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <array> 7#include "common/common_types.h"
8#include "core/hle/result.h" 8
9#include "core/hle/service/service.h" 9#include "core/hle/kernel/kernel.h"
10 10
11namespace Service { 11namespace Service {
12
13class Interface;
14
12namespace APT { 15namespace APT {
13 16
14/// Holds information about the parameters used in Send/Glance/ReceiveParameter 17/// Holds information about the parameters used in Send/Glance/ReceiveParameter