mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 09:35:21 +02:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dcfe3a25d | |||
| 93aafafa75 | |||
| 44dd53b367 | |||
| 1ffa586789 | |||
| f12baef633 | |||
| 3e4efe110b | |||
| 981a8e8f05 | |||
| 13d6992ca1 | |||
| 5af1c1f7ee | |||
| 00c236ce8c | |||
| 034fa7c29c | |||
| ac30d7a6dd | |||
| e848789965 | |||
| 2f1a1b1479 | |||
| 52caa9cee3 | |||
| e848bfbd81 |
@@ -0,0 +1,2 @@
|
||||
github: loganmc10
|
||||
patreon: loganmc10
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
run: |
|
||||
cargo build --release -v
|
||||
- name: Upload file
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gopher64-linux
|
||||
path: target/release/gopher64
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
run: |
|
||||
cargo build --release -v
|
||||
- name: Upload file
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gopher64-windows
|
||||
path: target/release/gopher64.exe
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
run: |
|
||||
cargo build --release -v
|
||||
- name: Upload file
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gopher64-mac
|
||||
path: target/release/gopher64
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gopher64"
|
||||
version = "0.1.0"
|
||||
version = "0.1.3"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@@ -13,16 +13,16 @@ sevenz-rust = "0.5"
|
||||
chrono = "0.4"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
eframe = "0.23"
|
||||
rfd = {version = "0.12", default-features = false, features = ["xdg-portal"] }
|
||||
eframe = "0.25"
|
||||
rfd = {version = "0.13", default-features = false, features = ["xdg-portal", "async-std"] }
|
||||
sha2 = "0.10"
|
||||
rusttype = "0.9"
|
||||
futures = "0.3"
|
||||
sdl2-sys = { git = "https://github.com/Rust-SDL2/rust-sdl2.git" }
|
||||
sdl2-sys = "0.36"
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
|
||||
[dependencies.sdl2]
|
||||
git = "https://github.com/Rust-SDL2/rust-sdl2.git"
|
||||
version = "0.36"
|
||||
default-features = false
|
||||
features = ["static-link","bundled"]
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 79 KiB |
@@ -184,11 +184,15 @@ int sdl_event_filter(void *userdata, SDL_Event *event)
|
||||
{
|
||||
if (event->type == SDL_WINDOWEVENT)
|
||||
{
|
||||
SDL_WSIPlatform *platform = (SDL_WSIPlatform *)&wsi->get_platform();
|
||||
switch (event->window.event)
|
||||
{
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
emu_running = 0;
|
||||
break;
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
platform->do_resize();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -58,3 +58,8 @@ void SDL_WSIPlatform::set_window(SDL_Window *_window)
|
||||
{
|
||||
window = _window;
|
||||
}
|
||||
|
||||
void SDL_WSIPlatform::do_resize()
|
||||
{
|
||||
resize = true;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
bool alive(Vulkan::WSI &wsi) override;
|
||||
void poll_input() override;
|
||||
void set_window(SDL_Window *_window);
|
||||
void do_resize();
|
||||
|
||||
private:
|
||||
VkSurfaceKHR surface;
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ impl Device {
|
||||
enabled: false,
|
||||
count: u64::MAX,
|
||||
handler: events::dummy_event,
|
||||
}; events::EventType::EventTypeCount as usize],
|
||||
}; events::EventType::Count as usize],
|
||||
next_event_count: u64::MAX,
|
||||
next_event: 0,
|
||||
},
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ pub struct Cpu {
|
||||
pub instrs: [fn(&mut device::Device, u32); 64],
|
||||
pub special_instrs: [fn(&mut device::Device, u32); 64],
|
||||
pub regimm_instrs: [fn(&mut device::Device, u32); 32],
|
||||
pub events: [device::events::Event; device::events::EventType::EventTypeCount as usize],
|
||||
pub events: [device::events::Event; device::events::EventType::Count as usize],
|
||||
pub next_event_count: u64,
|
||||
pub next_event: usize,
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ pub enum EventType {
|
||||
InterruptCheck,
|
||||
SPDma,
|
||||
Compare,
|
||||
EventTypeCount,
|
||||
Count,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
|
||||
+3
-3
@@ -1,5 +1,3 @@
|
||||
#![feature(round_ties_even)]
|
||||
#![feature(string_remove_matches)]
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
|
||||
mod device;
|
||||
@@ -56,8 +54,10 @@ struct Args {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let config_dir = dirs::config_dir().unwrap().join("gopher64");
|
||||
let cache_dir = dirs::cache_dir().unwrap().join("gopher64");
|
||||
|
||||
let _ = std::fs::create_dir_all(config_dir.clone());
|
||||
let _ = std::fs::create_dir_all(cache_dir.clone());
|
||||
let _ = std::fs::remove_file(cache_dir.clone().join("game_running"));
|
||||
|
||||
@@ -120,7 +120,7 @@ fn main() {
|
||||
}
|
||||
} else {
|
||||
let options = eframe::NativeOptions {
|
||||
initial_window_size: Some(eframe::egui::vec2(640.0, 480.0)),
|
||||
viewport: eframe::egui::ViewportBuilder::default().with_inner_size([640.0, 480.0]),
|
||||
..Default::default()
|
||||
};
|
||||
eframe::run_native(
|
||||
|
||||
+3
-1
@@ -115,7 +115,9 @@ impl eframe::App for GopherEguiApp {
|
||||
ui::input::configure_input_profile(&mut game_ui, profile_name);
|
||||
});
|
||||
self.configure_profile = false;
|
||||
if !self.profile_name.is_empty() && self.profile_name != "default" {
|
||||
if !self.profile_name.is_empty()
|
||||
&& !self.input_profiles.contains(&self.profile_name)
|
||||
{
|
||||
self.input_profiles.push(self.profile_name.clone())
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user