Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game registration refactor and improvements #4

Merged
merged 8 commits into from
Mar 20, 2024

Conversation

ethangreen-dev
Copy link
Member

No description provided.

This module will eventually make it possible for linux-native hosts to query information from the wine prefix's registry in a way that is 1:1 to windows.
This commit primarily includes a major refactor of game import routines.
It increases the extensibility of the system at the cost of a vtable
(Box<dyn GameImporter>) and overall system complexity.

The hope is that this refactor will make it easier to:
- a: Add new platforms or platform subvariants (SteamDirect, for
  example)
- b: Add wine subsystem support for linux-native hosts.

This also includes a first swing at "unrolling" the monolithic error
type at crate::error::Error, replacing it with mod-specific error impls.
This should *theoretically* increase general code quality by
de-incentivising a "bubble up" approach to error handling. By allowing
more granular control over error variants, callees can have more
control over handling recoverable error states.
src/util/reg.rs Fixed Show fixed Hide fixed
src/util/reg.rs Fixed Show fixed Hide fixed
todo!()
}

pub fn get_value_at(hkey: HKey, subkey: &str, name: &str) -> Result<String, Error> {

Check warning

Code scanning / clippy

unused variable: hkey Warning

unused variable: hkey
todo!()
}

pub fn get_value_at(hkey: HKey, subkey: &str, name: &str) -> Result<String, Error> {

Check warning

Code scanning / clippy

unused variable: subkey Warning

unused variable: subkey
todo!()
}

pub fn get_value_at(hkey: HKey, subkey: &str, name: &str) -> Result<String, Error> {

Check warning

Code scanning / clippy

unused variable: name Warning

unused variable: name
todo!()
}

pub fn get_keys_at(hkey: HKey, subkey: &str) -> Result<Vec<String>, Error> {

Check warning

Code scanning / clippy

unused variable: hkey Warning

unused variable: hkey
todo!()
}

pub fn get_keys_at(hkey: HKey, subkey: &str) -> Result<Vec<String>, Error> {

Check warning

Code scanning / clippy

unused variable: subkey Warning

unused variable: subkey
todo!()
}

pub fn get_values_at(hkey: HKey, subkey: &str) -> Result<Vec<RegKeyVal>, Error> {

Check warning

Code scanning / clippy

unused variable: hkey Warning

unused variable: hkey
todo!()
}

pub fn get_values_at(hkey: HKey, subkey: &str) -> Result<Vec<RegKeyVal>, Error> {

Check warning

Code scanning / clippy

unused variable: subkey Warning

unused variable: subkey
@ethangreen-dev ethangreen-dev merged commit efaf71e into develop Mar 20, 2024
3 of 5 checks passed
@ethangreen-dev ethangreen-dev deleted the game-reg-improvements branch March 20, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant