mirror of
https://github.com/wiiu-env/sdcafiine_plugin.git
synced 2024-11-25 12:46:56 +01:00
Display the correct version in the menu
This commit is contained in:
parent
ff27273a02
commit
9a69476bb1
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -18,6 +18,13 @@ jobs:
|
|||||||
needs: clang-format
|
needs: clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: create version.h
|
||||||
|
run: |
|
||||||
|
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
|
cat <<EOF > ./src/version.h
|
||||||
|
#pragma once
|
||||||
|
#define VERSION_EXTRA " (nightly-$git_hash)"
|
||||||
|
EOF
|
||||||
- name: build binary
|
- name: build binary
|
||||||
run: |
|
run: |
|
||||||
docker build . -t builder
|
docker build . -t builder
|
||||||
|
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -26,6 +26,13 @@ jobs:
|
|||||||
needs: clang-format
|
needs: clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: create version.h
|
||||||
|
run: |
|
||||||
|
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||||
|
cat <<EOF > ./src/version.h
|
||||||
|
#pragma once
|
||||||
|
#define VERSION_EXTRA " (nightly-$git_hash)"
|
||||||
|
EOF
|
||||||
- name: build binary
|
- name: build binary
|
||||||
run: |
|
run: |
|
||||||
docker build . -t builder
|
docker build . -t builder
|
||||||
|
@ -17,7 +17,7 @@ CRLayerHandle contentLayerHandle __attribute__((section(".data"))) = 0;
|
|||||||
INITIALIZE_PLUGIN() {
|
INITIALIZE_PLUGIN() {
|
||||||
// But then use libcontentredirection instead.
|
// But then use libcontentredirection instead.
|
||||||
ContentRedirectionStatus error;
|
ContentRedirectionStatus error;
|
||||||
if ((error = ContentRedirection_Init()) != CONTENT_REDIRECTION_RESULT_SUCCESS) {
|
if ((error = ContentRedirection_InitLibrary()) != CONTENT_REDIRECTION_RESULT_SUCCESS) {
|
||||||
DEBUG_FUNCTION_LINE_ERR("Failed to init ContentRedirection. Error %d", error);
|
DEBUG_FUNCTION_LINE_ERR("Failed to init ContentRedirection. Error %d", error);
|
||||||
OSFatal("Failed to init ContentRedirection.");
|
OSFatal("Failed to init ContentRedirection.");
|
||||||
}
|
}
|
||||||
|
14
src/main.h
14
src/main.h
@ -1,15 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Main */
|
#define VERSION "v0.1"
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
#include <nsysnet/socket.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#include "modpackSelector.h"
|
#include "modpackSelector.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "version.h"
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -114,7 +116,7 @@ void HandleMultiModPacks(uint64_t titleID) {
|
|||||||
if (initScreen) {
|
if (initScreen) {
|
||||||
OSScreenClearBufferEx(SCREEN_TV, 0);
|
OSScreenClearBufferEx(SCREEN_TV, 0);
|
||||||
OSScreenClearBufferEx(SCREEN_DRC, 0);
|
OSScreenClearBufferEx(SCREEN_DRC, 0);
|
||||||
console_print_pos(x_offset, -1, " -- SDCafiine plugin %s by Maschell --");
|
console_print_pos(x_offset, -1, "SDCafiine plugin " VERSION VERSION_EXTRA);
|
||||||
console_print_pos(x_offset, 1, "Select your options and press A to launch.");
|
console_print_pos(x_offset, 1, "Select your options and press A to launch.");
|
||||||
console_print_pos(x_offset, 2, "Press B to launch without mods");
|
console_print_pos(x_offset, 2, "Press B to launch without mods");
|
||||||
int y_offset = 4;
|
int y_offset = 4;
|
||||||
|
2
src/version.h
Normal file
2
src/version.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#pragma once
|
||||||
|
#define VERSION_EXTRA ""
|
Loading…
Reference in New Issue
Block a user