mirror of
https://github.com/wiiu-env/AutobootModule.git
synced 2024-11-13 06:55:07 +01:00
Display the AutobootModule version in the Boot Selector
This commit is contained in:
parent
26c5141ce0
commit
babcca3f0c
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -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 AUTOBOOT_MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -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 AUTOBOOT_MODULE_VERSION_EXTRA " (nightly-$git_hash)"
|
||||
EOF
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -t builder
|
||||
|
@ -3,9 +3,9 @@
|
||||
#include "DrawUtils.h"
|
||||
#include "icon_png.h"
|
||||
#include "logger.h"
|
||||
#include "version.h"
|
||||
#include <coreinit/debug.h>
|
||||
#include <coreinit/screen.h>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <gx2/state.h>
|
||||
#include <malloc.h>
|
||||
@ -15,6 +15,8 @@
|
||||
#include <vector>
|
||||
#include <vpad/input.h>
|
||||
|
||||
#define AUTOBOOT_MODULE_VERSION "v0.1.0"
|
||||
|
||||
const char *autoboot_config_strings[] = {
|
||||
"wiiu_menu",
|
||||
"homebrew_launcher",
|
||||
@ -157,6 +159,8 @@ int32_t handleMenuScreen(std::string &configPath, int32_t autobootOptionInput, c
|
||||
DrawUtils::drawPNG(16, 2, icon_png);
|
||||
DrawUtils::print(64 + 2, 6 + 24, "Boot Selector");
|
||||
DrawUtils::drawRectFilled(8, 8 + 24 + 4, SCREEN_WIDTH - 8 * 2, 3, COLOR_WHITE);
|
||||
DrawUtils::setFontSize(16);
|
||||
DrawUtils::print(SCREEN_WIDTH - 16, 6 + 24, AUTOBOOT_MODULE_VERSION AUTOBOOT_MODULE_VERSION_EXTRA, true);
|
||||
|
||||
// draw bottom bar
|
||||
DrawUtils::drawRectFilled(8, SCREEN_HEIGHT - 24 - 8 - 4, SCREEN_WIDTH - 8 * 2, 3, COLOR_WHITE);
|
||||
|
2
source/version.h
Normal file
2
source/version.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#define AUTOBOOT_MODULE_VERSION_EXTRA ""
|
Loading…
Reference in New Issue
Block a user