Update to spice2x-25-04-25 (pre-apply)
> broken commit
This commit is contained in:
@@ -33,6 +33,18 @@ std::vector<Button> &games::jb::get_buttons() {
|
||||
return buttons;
|
||||
}
|
||||
|
||||
std::string games::jb::get_buttons_help() {
|
||||
// keep to max 100 characters wide
|
||||
return
|
||||
" 1 2 3 4 \n"
|
||||
" 5 6 7 8 \n"
|
||||
" 9 10 11 12 \n"
|
||||
" 13 14 15 16 \n"
|
||||
"\n"
|
||||
"Touchscreen input is also supported."
|
||||
;
|
||||
}
|
||||
|
||||
std::vector<Light> &games::jb::get_lights() {
|
||||
static std::vector<Light> lights;
|
||||
|
||||
|
||||
@@ -56,5 +56,6 @@ namespace games::jb {
|
||||
|
||||
// getters
|
||||
std::vector<Button> &get_buttons();
|
||||
std::string get_buttons_help();
|
||||
std::vector<Light> &get_lights();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "jb.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "avs/game.h"
|
||||
#include "cfg/configurator.h"
|
||||
#include "hooks/graphics/graphics.h"
|
||||
#include "touch/touch.h"
|
||||
#include "util/logging.h"
|
||||
@@ -162,6 +164,25 @@ namespace games::jb {
|
||||
JBGame::JBGame() : Game("Jubeat") {
|
||||
}
|
||||
|
||||
void JBGame::pre_attach() {
|
||||
if (!cfg::CONFIGURATOR_STANDALONE) {
|
||||
const auto current_path = std::filesystem::current_path();
|
||||
log_misc("jubeat", "current working directory: {}", current_path.string());
|
||||
if (current_path.parent_path() == current_path.root_path()) {
|
||||
log_fatal(
|
||||
"jubeat",
|
||||
"\n\nInvalid path error; jubeat cannot run from a directory in the drive root\n"
|
||||
"The game will overflow the stack and silently fail to boot\n\n"
|
||||
"Instead, it must be at least two levels deep, for example:\n"
|
||||
" c:\\jubeat\\spice.exe <- CRASH\n"
|
||||
" c:\\jubeat\\contents\\spice.exe <- OK\n\n"
|
||||
"To fix this, create a new directory and move ALL game files there.\n\n"
|
||||
"Your current working directory: {}\n",
|
||||
current_path.string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JBGame::attach() {
|
||||
Game::attach();
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace games::jb {
|
||||
class JBGame : public games::Game {
|
||||
public:
|
||||
JBGame();
|
||||
virtual void pre_attach() override;
|
||||
virtual void attach() override;
|
||||
virtual void detach() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user