aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-08-24 14:34:08 -0400
committer浅倉麗子2020-08-24 14:34:08 -0400
commited1002284a51b57db90c8a83c12dedc3c54c34ca (patch)
tree71073460f649d8da69d4d77e1b17334ea54c2861
parentRename files (diff)
downloadsharpscale-ed1002284a51b57db90c8a83c12dedc3c54c34ca.tar.gz
Build with latest psp2dbg
-rw-r--r--CMakeLists.txt20
-rw-r--r--config-app/CMakeLists.txt2
-rw-r--r--config-app/main.c4
-rw-r--r--scaling-test/CMakeLists.txt2
-rw-r--r--scaling-test/main.c4
-rw-r--r--sharpscale.c4
6 files changed, 18 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb5fe54..b44aacf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,22 +36,22 @@ include_directories(
"${CMAKE_SOURCE_DIR}/include"
)
-set(LOG_ENABLE "1" CACHE STRING "Enable logging")
-set(FILELOG_ENABLE "0" CACHE STRING "Enable file logging")
-set(LOG_LEVEL "SCE_DBG_LOG_LEVEL_INFO" CACHE STRING "Log verbosity level")
+set(LOGGING "1" CACHE STRING "Enable logging")
+set(FILE_LOGGING "0" CACHE STRING "Enable file logging")
+set(LOG_LEVEL "INFO" CACHE STRING "Log verbosity level")
-if(FILELOG_ENABLE)
+add_compile_definitions(
+ SCE_DBG_LOGGING_ENABLED=${LOGGING}
+ SCE_DBG_FILE_LOGGING_ENABLED=${FILE_LOGGING}
+ SCE_DBG_MINIMUM_LOG_LEVEL=SCE_DBG_LOG_LEVEL_${LOG_LEVEL}
+)
+
+if(FILE_LOGGING)
set(LOG_PREFIX "[Sharpscale] ")
else()
set(LOG_PREFIX "\\033[0;35m[Sharpscale]\\033[0m ")
endif()
-add_compile_definitions(
- SCE_DBG_LOGGING_ENABLED=${LOG_ENABLE}
- SCE_DBG_FILELOG_ENABLED=${FILELOG_ENABLE}
- SCE_DBG_MINIMUM_LOG_LEVEL=${LOG_LEVEL}
-)
-
# Build self
set(ELF "sharpscale.elf")
diff --git a/config-app/CMakeLists.txt b/config-app/CMakeLists.txt
index 854d716..e5355ee 100644
--- a/config-app/CMakeLists.txt
+++ b/config-app/CMakeLists.txt
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-if(FILELOG_ENABLE)
+if(FILE_LOGGING)
set(LOG_PREFIX "[SharpscaleConfiguration] ")
else()
set(LOG_PREFIX "\\033[0;33m[SharpscaleConfiguration]\\033[0m ")
diff --git a/config-app/main.c b/config-app/main.c
index bcb4506..edf9890 100644
--- a/config-app/main.c
+++ b/config-app/main.c
@@ -50,7 +50,7 @@ static int text_yellow(int a) {
}
void _start(UNUSED int args, UNUSED void *argp) {
- SCE_DBG_FILELOG_INIT("ux0:/sharpscale-config.log");
+ SCE_DBG_FILE_LOGGING_INIT("ux0:/sharpscale-config.log");
// Show application memory budget information
@@ -226,6 +226,6 @@ void _start(UNUSED int args, UNUSED void *argp) {
}
done:
- SCE_DBG_FILELOG_TERM();
+ SCE_DBG_FILE_LOGGING_TERM();
sceKernelExitProcess(0);
}
diff --git a/scaling-test/CMakeLists.txt b/scaling-test/CMakeLists.txt
index f8e8be6..2558153 100644
--- a/scaling-test/CMakeLists.txt
+++ b/scaling-test/CMakeLists.txt
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-if(FILELOG_ENABLE)
+if(FILE_LOGGING)
set(LOG_PREFIX "[SharpscaleScalingTest] ")
set(PROGRAM_AUTHORITY "UNSAFE")
else()
diff --git a/scaling-test/main.c b/scaling-test/main.c
index 3a8afc4..e843613 100644
--- a/scaling-test/main.c
+++ b/scaling-test/main.c
@@ -105,7 +105,7 @@ static void render(int *fb_base, int width, int pitch, int height) {
}
void _start(UNUSED int args, UNUSED void *argp) {
- SCE_DBG_FILELOG_INIT("ux0:/sharpscale-scaling-test.log");
+ SCE_DBG_FILE_LOGGING_INIT("ux0:/sharpscale-scaling-test.log");
fnblit_set_font(_binary_unifont_sfn_start);
fnblit_set_fg(WHITE);
@@ -186,6 +186,6 @@ void _start(UNUSED int args, UNUSED void *argp) {
}
fail:
- SCE_DBG_FILELOG_TERM();
+ SCE_DBG_FILE_LOGGING_TERM();
sceKernelExitProcess(0);
}
diff --git a/sharpscale.c b/sharpscale.c
index e4c6cab..955a0d9 100644
--- a/sharpscale.c
+++ b/sharpscale.c
@@ -300,7 +300,7 @@ done:
}
static void startup(void) {
- SCE_DBG_FILELOG_INIT("ur0:/sharpscale.log");
+ SCE_DBG_FILE_LOGGING_INIT("ur0:/sharpscale.log");
memset(inject_id, 0xFF, sizeof(inject_id));
memset(hook_id, 0xFF, sizeof(hook_id));
memset(hook_ref, 0xFF, sizeof(hook_ref));
@@ -309,7 +309,7 @@ static void startup(void) {
static void cleanup(void) {
for (int i = 0; i < N_INJECT; i++) { UNINJECT(i); }
for (int i = 0; i < N_HOOK; i++) { UNHOOK(i); }
- SCE_DBG_FILELOG_TERM();
+ SCE_DBG_FILE_LOGGING_TERM();
}
USED int module_start(UNUSED SceSize args, UNUSED const void *argp) {