Skip to content

Commit

Permalink
Fix: Modified BG3 to use overlay.
Browse files Browse the repository at this point in the history
  • Loading branch information
CHollingworth committed Jan 8, 2024
1 parent 76754f5 commit af4af84
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Lampray/Control/lampNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
#ifndef LAMP_LAMPNOTIFICATION_H
#define LAMP_LAMPNOTIFICATION_H

#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include "../../third-party/imgui/imgui.h"
#include "../Lang/lampLang.h"


namespace Lamp::Core{
class lampNotification{
Expand Down
21 changes: 17 additions & 4 deletions game-data/BG3/BG3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,31 @@ Lamp::Game::lampReturn Lamp::Game::BG3::preCleanUp() {
std::filesystem::is_directory(installPath.parent_path() / ("Lampray Managed - " + installPath.stem().string()))) {
if(std::filesystem::is_empty(std::filesystem::path(keyInfo["installDirPath"]))){
system(("pkexec umount \""+Lamp::Games::getInstance().currentGame->KeyInfo()["installDirPath"]+"\"").c_str());
std::filesystem::rename(installPath.parent_path() / ("Lampray Managed - " + installPath.stem().string()), keyInfo["installDirPath"]);
try {
std::filesystem::rename(
installPath.parent_path() / ("Lampray Managed - " + installPath.stem().string()),
keyInfo["installDirPath"]);
} catch (std::exception ex) {

}

skipMount = false;
}else {
skipMount = true;
}
if(std::filesystem::is_empty(std::filesystem::path(KeyInfo()["appDataPath"]+"/Mods"))){
system(("pkexec umount \""+Lamp::Games::getInstance().currentGame->KeyInfo()["appDataPath"]+"/Mods\"").c_str());
std::filesystem::rename(std::filesystem::path(KeyInfo()["appDataPath"]+"/Mods").parent_path() / ("Lampray Managed - " + std::filesystem::path(KeyInfo()["appDataPath"]+"/Mods").stem().string()), std::filesystem::path(KeyInfo()["appDataPath"]+"/Mods"));
try {
std::filesystem::rename(std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods").parent_path() /
("Lampray Managed - " +
std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods").stem().string()),
std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods"));
} catch (std::exception ex) {

}
skipMount = false;
}else {
skipMount = true;
}

std::cout << "The version directory exists in the parent path." << std::endl;
} else {
if(std::filesystem::is_empty(keyInfo["installDirPath"])){
Expand Down

0 comments on commit af4af84

Please sign in to comment.