Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions maxima-lib/src/lsx/request/license.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use log::info;
use std::env;
use log::{debug, info};

use crate::{
core::{auth::hardware::HardwareInfo, launch::LaunchMode},
Expand All @@ -17,6 +18,10 @@ pub async fn handle_license_request(
) -> Result<Option<LSXResponseType>, LSXRequestError> {
info!("Requesting OOA License and Denuvo Token");

if let Ok(token) = env::var("MAXIMA_DENUVO_TOKEN") {
return make_lsx_handler_response!(Response, RequestLicenseResponse, { attr_License: token.to_owned() });
}

let arc = state.write().await.maxima_arc();
let mut maxima = arc.lock().await;

Expand Down Expand Up @@ -51,5 +56,9 @@ pub async fn handle_license_request(

info!("Successfully retrieved license tokens");

make_lsx_handler_response!(Response, RequestLicenseResponse, { attr_License: license.game_token.unwrap() })
let token = license.game_token.as_ref().unwrap();

debug!("Got Denuvo Token: {}", token);

make_lsx_handler_response!(Response, RequestLicenseResponse, { attr_License: token.to_owned() })
}
Loading