Skip to content

Commit

Permalink
chore: move device configuration into "define" macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Jun 21, 2024
1 parent 20bfacf commit 9abb109
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scenes/mtp/mtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,11 +1086,11 @@ int BuildDeviceInfo(uint8_t* buffer) {
ptr += length;

// Device version
WriteMTPString(ptr, "1.0", &length);
WriteMTPString(ptr, MTP_DEVICE_VERSION, &length);

Check failure on line 1089 in src/scenes/mtp/mtp.c

View workflow job for this annotation

GitHub Actions / Nightly Build for (Official) Dev channel

'MTP_DEVICE_VERSION' undeclared (first use in this function); did you mean 'MTP_DEVICE_VERISON'?

Check failure on line 1089 in src/scenes/mtp/mtp.c

View workflow job for this annotation

GitHub Actions / Nightly Build for (Unleashed) Development channel

'MTP_DEVICE_VERSION' undeclared (first use in this function); did you mean 'MTP_DEVICE_VERISON'?
ptr += length;

// Serial number
WriteMTPString(ptr, "HakureiReimu", &length);
WriteMTPString(ptr, MTP_DEVICE_SERIAL, &length);
ptr += length;

return ptr - buffer;
Expand Down
4 changes: 4 additions & 0 deletions src/scenes/mtp/mtp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

// MTP Device Serial
#define MTP_DEVICE_SERIAL "HakureiReimu"
#define MTP_DEVICE_VERISON "1.0"

#define MTP_STANDARD_VERSION 100
#define MTP_VENDOR_EXTENSION_ID 0x6
#define MTP_VENDOR_EXTENSION_VERSION 100
Expand Down

0 comments on commit 9abb109

Please sign in to comment.