added steam init
This commit is contained in:
@@ -10,6 +10,7 @@ image = "0.24.7" # Image processing
|
|||||||
walkdir = "2.4.0" # Directory traversal
|
walkdir = "2.4.0" # Directory traversal
|
||||||
global-hotkey = "0.4.2" # Global hotkey registration
|
global-hotkey = "0.4.2" # Global hotkey registration
|
||||||
lazy_static = "1.4.0" # Thread-safe static initialization
|
lazy_static = "1.4.0" # Thread-safe static initialization
|
||||||
|
steamworks = "0.11.0"
|
||||||
|
|
||||||
# Platform-specific dependencies
|
# Platform-specific dependencies
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ use global_hotkey::{
|
|||||||
// Import our platform-specific module
|
// Import our platform-specific module
|
||||||
mod platform;
|
mod platform;
|
||||||
|
|
||||||
|
pub mod steam;
|
||||||
|
use steam::*;
|
||||||
|
|
||||||
// Define a struct to hold cursor information
|
// Define a struct to hold cursor information
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct CursorInfo {
|
struct CursorInfo {
|
||||||
@@ -257,6 +260,7 @@ fn boot() -> (CursorRush, Task<Message>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> iced::Result {
|
fn main() -> iced::Result {
|
||||||
|
let _steam = steam::Steam::new();
|
||||||
iced::application("Cursor Rush", update, view)
|
iced::application("Cursor Rush", update, view)
|
||||||
.theme(|_| Theme::Dark)
|
.theme(|_| Theme::Dark)
|
||||||
.subscription(subscription)
|
.subscription(subscription)
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
use steamworks::{AppId, Client, SingleClient};
|
||||||
|
|
||||||
|
|
||||||
|
pub struct Steam {
|
||||||
|
client: Client,
|
||||||
|
single: SingleClient
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Steam {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
let (client, single) = Client::init_app(AppId(1430270)).unwrap();
|
||||||
|
Self {
|
||||||
|
client, single
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user