testing actions

This commit is contained in:
Isaac0-dev 2025-03-08 20:12:53 +10:00
parent 2ab7d32086
commit a583814ef9
2 changed files with 29 additions and 9 deletions

24
.github/workflows/coop.yaml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Build coop
on:
push:
branches:
- dev
pull_request:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev
- name: Build the game
run: make -j$(nproc)

View file

@ -57,7 +57,6 @@ static bool is_rom_valid(const std::string romPath) {
ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(dataHash[i]);
}
bool foundHash = false;
for (VanillaMD5 *md5 = sVanillaMD5; md5->localizationName != NULL; md5++) {
if (md5->md5 == ss.str()) {
std::string destPath = fs_get_write_path("") + std::string("baserom.") + md5->localizationName + ".z64";
@ -72,12 +71,11 @@ static bool is_rom_valid(const std::string romPath) {
snprintf(gRomFilename, SYS_MAX_PATH, "%s", destPath.c_str()); // Load the copied rom
gRomIsValid = true;
foundHash = true;
break;
return true;
}
}
return foundHash;
return false;
}
inline static bool scan_path_for_rom(const char *dir) {
@ -104,11 +102,9 @@ bool main_rom_handler(void) {
#ifdef LOADING_SCREEN_SUPPORTED
void rom_on_drop_file(const char *path) {
static bool hasDroppedInvalidFile = false;
if (strlen(path) > 0) {
if (!is_rom_valid(path) && !hasDroppedInvalidFile) {
hasDroppedInvalidFile = true;
strcat(gCurrLoadingSegment.str, "\n\\#ffc000\\The file you last dropped was not a valid, vanilla SM64 rom.");
}
if (strlen(path) > 0 && !is_rom_valid(path) && !hasDroppedInvalidFile) {
hasDroppedInvalidFile = true;
strcat(gCurrLoadingSegment.str, "\n\\#ffc000\\The file you last dropped was not a valid, vanilla SM64 rom.");
}
}
#endif