1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-08 19:52:12 +00:00
nxdumptool/include/gamecard_tab.hpp
Pablo Curiel e1df86fb27 Fix building with latest libnx + QoL changes.
libnx now implements fsDeviceOperatorGetGameCardIdSet(), so I got rid of my own implementation.

Other changes include:

* cnmt: add cnmtVerifyContentHash().

* defines: add SHA256_HASH_STR_SIZE.

* fs_ext: add FsCardId1MakerCode, FsCardId1MemoryType and FsCardId2CardType enums.
* fs_ext: update FsCardId* structs.

* gamecard: change all package_id definitions from u64 -> u8[0x8].
* gamecard: fix misleading struct member names in GameCardHeader.
* gamecard: rename gamecardGetIdSet() -> gamecardGetCardIdSet().

* gamecard_tab: fix Package ID printing.
* gamecard_tab: add Card ID Set printing.

* host: add executable flag to Python scripts.

* keys: detect if we're dealing with a wiped eTicket RSA device key (e.g. via set:cal blanking). If so, the application will still launch, but all operations related to personalized titlekey crypto are disabled.

* pfs: rename PartitionFileSystemFileContext -> PartitionFileSystemImageContext and propagate the change throughout the codebase.
* pfs: rename PFS_FULL_HEADER_ALIGNMENT -> PFS_HEADER_PADDING_ALIGNMENT and update pfsWriteImageContextHeaderToMemoryBuffer() accordingly.

* poc: print certain button prompts with reversed colors, in the hopes of getting the user's attention.
* poc: NSP, Ticket and NCA submenus for updates and DLC updates now display the highest available title by default.
* poc: simplified output path generation for extracted NCA FS section dumps.
* poc: handle edge cases where a specific NCA from an update has no matching equivalent by type/ID offset in its base title (e.g. Fall Guys' HtmlDocument NCA).
* poc: implement NCA checksum validation while generating NSP dumps.

* romfs: update romfsInitializeContext() to allow its base_nca_fs_ctx argument to be NULL.

* usb: use USB_BOS_SIZE only once.

* workflow: update commit hash referenced by "rewrite-prerelease" tag on update.
2023-11-03 02:22:47 +01:00

54 lines
1.7 KiB
C++

/*
* gamecard_tab.hpp
*
* Copyright (c) 2020-2023, DarkMatterCore <pabloacurielz@gmail.com>.
*
* This file is part of nxdumptool (https://github.com/DarkMatterCore/nxdumptool).
*
* nxdumptool is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nxdumptool is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef __GAMECARD_TAB_HPP__
#define __GAMECARD_TAB_HPP__
#include "root_view.hpp"
#include "layered_error_frame.hpp"
#include "focusable_item.hpp"
namespace nxdt::views
{
class GameCardTab: public LayeredErrorFrame
{
typedef bool (*GameCardSizeFunc)(u64 *out_size);
private:
RootView *root_view = nullptr;
nxdt::tasks::GameCardStatusEvent::Subscription gc_status_task_sub;
GameCardStatus gc_status = GameCardStatus_NotInserted;
void ProcessGameCardStatus(GameCardStatus gc_status);
std::string GetFormattedSizeString(GameCardSizeFunc func);
std::string GetCardIdSetString(FsGameCardIdSet *card_id_set);
void PopulateList(void);
public:
GameCardTab(RootView *root_view);
~GameCardTab(void);
};
}
#endif /* __GAMECARD_TAB_HPP__ */