-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge both GUI/Console to one branch
- Fixed PSID. - Fixed Model detection. - Fixed Unit detection.
- Loading branch information
Showing
36 changed files
with
1,368 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,13 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE) | ||
if (DEFINED ENV{VITASDK}) | ||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file") | ||
else() | ||
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!") | ||
endif() | ||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) | ||
if(DEFINED ENV{VITASDK}) | ||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file") | ||
else() | ||
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!") | ||
endif() | ||
endif() | ||
|
||
set(SHORT_NAME VITAident) | ||
project(${SHORT_NAME}) | ||
include("${VITASDK}/share/vita.cmake" REQUIRED) | ||
|
||
set(VITA_APP_NAME "VITAident") | ||
set(VITA_TITLEID "VID000016") | ||
set(VITA_VERSION "00.74") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-truncation -fno-lto") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions") | ||
|
||
include_directories( | ||
include | ||
) | ||
|
||
add_executable(${SHORT_NAME} | ||
source/app.c | ||
source/fs.c | ||
source/kernel.c | ||
source/main.c | ||
source/net.c | ||
source/power.c | ||
source/utils.c | ||
) | ||
|
||
target_link_libraries(${SHORT_NAME} | ||
vita2d | ||
png | ||
jpeg | ||
z | ||
m | ||
c | ||
SceAppMgr_stub | ||
SceAppUtil_stub | ||
SceAVConfig_stub | ||
SceBtForDriver_stub | ||
SceCommonDialog_stub | ||
SceCompat_stub | ||
SceCtrl_stub | ||
SceDisplay_stub | ||
SceGxm_stub | ||
SceIofilemgr_stub | ||
SceLibKernel_stub | ||
SceNet_stub | ||
SceNetCtl_stub | ||
ScePower_stub | ||
ScePvf_stub | ||
SceRegistryMgr_stub | ||
SceSysmodule_stub | ||
SceUdcd_stub | ||
SceUsbstorVStorDriver_stub | ||
SceVshBridge_stub | ||
) | ||
|
||
vita_create_self(eboot.bin ${SHORT_NAME} UNSAFE) | ||
vita_create_vpk(${SHORT_NAME}.vpk ${VITA_TITLEID} eboot.bin | ||
VERSION ${VITA_VERSION} | ||
NAME ${VITA_APP_NAME} | ||
FILE sce_sys/icon0.png sce_sys/icon0.png | ||
sce_sys/livearea/contents/bg.png sce_sys/livearea/contents/bg.png | ||
sce_sys/livearea/contents/startup.png sce_sys/livearea/contents/startup.png | ||
sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml | ||
) | ||
project(VITAident) | ||
add_subdirectory(console) | ||
add_subdirectory(gui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef _VITAIDENT_APP_H_ | ||
#define _VITAIDENT_APP_H_ | ||
|
||
#include <vitasdk.h> | ||
|
||
SceInt App_InitAppUtil(SceVoid); | ||
SceInt App_TermAppUtil(SceVoid); | ||
SceChar8 *App_GetUser(SceVoid); | ||
const char *App_GetLanguage(SceVoid); | ||
SceOff App_GetTotalCapacity(const char *device); | ||
SceOff App_GetUsedCapacity(const char *device); | ||
char *App_GetStorageInfo(const char *device, SceInt type); | ||
SceBool App_GetEnterButton(SceVoid); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef _VITAIDENT_NET_H_ | ||
#define _VITAIDENT_NET_H_ | ||
|
||
#include <vitasdk.h> | ||
|
||
SceVoid Net_Init(SceVoid); | ||
SceVoid Net_Term(SceVoid); | ||
char *Net_GetMacAddr(SceVoid); | ||
char *Net_GetIPAddr(SceVoid); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef _VITAIDENT_POWER_H_ | ||
#define _VITAIDENT_POWER_H_ | ||
|
||
#include <vitasdk.h> | ||
|
||
typedef enum | ||
{ | ||
clockFrequencyType_cpu, | ||
clockFrequencyType_bus, | ||
clockFrequencyType_gpu, | ||
clockFrequencyType_gpuXbar | ||
} clockFrequencyType; | ||
|
||
//SceInt scePowerPower_GetBatteryElec(SceVoid); Crashes the VITA | ||
|
||
SceInt Power_GetClockFrequency(clockFrequencyType type); | ||
const char *Power_GetBatteryStatus(SceVoid); | ||
const char *Power_GetBatteryPercentage(SceVoid); | ||
const char *Power_GetUsingWireless(SceVoid); | ||
const char *Power_GetBatterySOH(SceVoid); | ||
const char *Power_GetBatteryCycleCount(SceVoid); | ||
const char *Power_GetBatteryCapacity(SceVoid); | ||
const char *Power_GetBatteryRemainCapacity(SceVoid); | ||
const char *Power_GetBatteryTemp(SceInt type); | ||
const char *Power_GetBatteryVoltage(SceVoid); | ||
const char *Power_GetUdcdCableState(SceVoid); | ||
const char *Power_GetUsbChargingState(SceVoid); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef _VITAIDENT_REGMGR_H_ | ||
#define _VITAIDENT_REGMGR_H_ | ||
|
||
#include <vitasdk.h> | ||
|
||
SceInt RegMgr_GetBrightness(SceVoid); | ||
SceInt RegMgr_GetInt(const char *category, const char *name); | ||
char *RegMgr_GetStr(const char *category, const char *name); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef _VITAIDENT_UTILS_H_ | ||
#define _VITAIDENT_UTILS_H_ | ||
|
||
#include <vitasdk.h> | ||
|
||
/// Checks whether a result code indicates success. | ||
#define R_SUCCEEDED(res) ((res)>=0) | ||
/// Checks whether a result code indicates failure. | ||
#define R_FAILED(res) ((res)<0) | ||
/// Returns the level of a result code. | ||
|
||
SceUInt32 pressed; | ||
|
||
SceInt Utils_HandleControls(SceVoid); | ||
SceVoid Utils_GetSizeString(char *string, SceOff size); | ||
char*Utils_StringConcat(char *s1, char *s2); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.