Log the module version on each application start

This commit is contained in:
Maschell 2023-01-04 22:34:03 +01:00
parent 7d67184cfd
commit e85d383ec4
5 changed files with 22 additions and 0 deletions

View File

@ -18,6 +18,13 @@ jobs:
needs: clang-format
steps:
- uses: actions/checkout@v3
- name: create version.h
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
cat <<EOF > ./source/version.h
#pragma once
#define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary
run: |
docker build . -t builder

View File

@ -26,6 +26,13 @@ jobs:
needs: clang-format
steps:
- uses: actions/checkout@v3
- name: create version.h
run: |
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
cat <<EOF > ./source/version.h
#pragma once
#define MODULE_VERSION_EXTRA " (nightly-$git_hash)"
EOF
- name: build binary
run: |
docker build . -t builder

View File

@ -117,6 +117,8 @@ WUMS_APPLICATION_STARTS() {
return;
}
OSReport("Running FunctionPatcherModule " MODULE_VERSION_FULL "\n");
// Now we can update the pointer with the "real" functions
gMEMAllocFromDefaultHeapExForThreads = MEMAllocFromDefaultHeapEx;
gMEMFreeToDefaultHeapForThreads = MEMFreeToDefaultHeap;

View File

@ -1,9 +1,13 @@
#pragma once
#include "../PatchedFunctionData.h"
#include "version.h"
#include <coreinit/memheap.h>
#include <memory>
#include <vector>
#define MODULE_VERSION "v0.1"
#define MODULE_VERSION_FULL MODULE_VERSION MODULE_VERSION_EXTRA
#define JUMP_HEAP_DATA_SIZE (32 * 1024)
extern char gJumpHeapData[];
extern MEMHeapHandle gJumpHeapHandle;

2
source/version.h Normal file
View File

@ -0,0 +1,2 @@
#pragma once
#define MODULE_VERSION_EXTRA ""