mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
Modest cleanups for DSi_NAND (#1714)
* Add a definition for TMD files * Wrap TitleMetadata in a namespace * Add a comment * Remove TitleMetadataCertificate - melonDS ignores it anyway * Refactor the use of title metadata - Move bitwise operations on the title ID into helper methods - Use TitleMetadata objects instead of pointers to raw data * Slight cleanup in DSi_NAND - Replace some constants with sizeof - Use an NDSHeader object instead of a raw array of bytes * Add a DSi_NAND::ImportFile overload that loads a file from memory * Split most of ImportTitle into InitTitleFileStructure - It will be reused in the next commit * Add ability to import title from memory * Fix another potential issue * Fix broken DSiWare installation - The bytes of the title ID/category were being swapped in most places, but not all * Add some logging calls * Declare array sizes in DSi_TMD in decimal, not hex * Add a space after the #endif - To adhere to the style guide * Assert the size of TitleMetadataContent * Change the type of SignatureName * Don't mark the TMD structs as packed * Remove extraneous comments * Cut down some newlines
This commit is contained in:

committed by
GitHub

parent
d1ff103259
commit
0947e941b8
@ -29,6 +29,8 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
#include "DSi_TMD.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class TitleManagerDialog;
|
||||
@ -90,7 +92,7 @@ private:
|
||||
Ui::TitleManagerDialog* ui;
|
||||
|
||||
QString importAppPath;
|
||||
u8 importTmdData[0x208];
|
||||
DSi_TMD::TitleMetadata importTmdData;
|
||||
bool importReadOnly;
|
||||
|
||||
QAction* actImportTitleData[3];
|
||||
@ -104,7 +106,7 @@ class TitleImportDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TitleImportDialog(QWidget* parent, QString& apppath, u8* tmd, bool& readonly);
|
||||
explicit TitleImportDialog(QWidget* parent, QString& apppath, const DSi_TMD::TitleMetadata* tmd, bool& readonly);
|
||||
~TitleImportDialog();
|
||||
|
||||
private slots:
|
||||
@ -124,7 +126,7 @@ private:
|
||||
QNetworkReply* netreply;
|
||||
|
||||
QString& appPath;
|
||||
u8* tmdData;
|
||||
const DSi_TMD::TitleMetadata* tmdData;
|
||||
bool& readOnly;
|
||||
|
||||
u32 titleid[2];
|
||||
|
Reference in New Issue
Block a user