mirror of
https://github.com/FranLMSP/snes.git
synced 2026-10-03 07:55:17 -04:00
clippy fix
This commit is contained in:
@@ -52,10 +52,10 @@ fn build_inputs(ui: &mut egui::Ui, input_values: &mut MemoryMapInputs, input_res
|
||||
sanitize_input(&mut input_values.page_end, true);
|
||||
sanitize_input(&mut input_values.address_start, false);
|
||||
sanitize_input(&mut input_values.address_end, false);
|
||||
input_result.page_start = format!("{}", input_values.page_start);
|
||||
input_result.page_end = format!("{}", input_values.page_end);
|
||||
input_result.address_start = format!("{}", input_values.address_start);
|
||||
input_result.address_end = format!("{}", input_values.address_end);
|
||||
input_result.page_start = input_values.page_start.to_string();
|
||||
input_result.page_end = input_values.page_end.to_string();
|
||||
input_result.address_start = input_values.address_start.to_string();
|
||||
input_result.address_end = input_values.address_end.to_string();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
pub mod debug;
|
||||
pub mod interface;
|
||||
pub mod memory_map;
|
||||
pub mod cpu;
|
||||
pub mod ppu;
|
||||
pub mod ppu_graphics;
|
||||
pub mod common;
|
||||
|
||||
pub use debug::build_all_debug_options;
|
||||
pub use interface::build_all_debug_options;
|
||||
@@ -24,7 +24,7 @@ fn build_bg_preview_window(ctx: &Context, bgdebug: &mut BgDebug, registers: &PPU
|
||||
egui::ScrollArea::both().show(ui, |ui| {
|
||||
ui.label("Charset");
|
||||
compute_2bpp_bg_char_framebuffer(bgdebug.background, &mut bgdebug.char_framebuffer, registers);
|
||||
paint_texture(ui, &mut bgdebug.char_texture, &mut bgdebug.char_framebuffer, 16 * 8, 8 * 8);
|
||||
paint_texture(ui, &mut bgdebug.char_texture, &bgdebug.char_framebuffer, 16 * 8, 8 * 8);
|
||||
// ui.label("Background");
|
||||
// paint_texture(ui, &mut bgdebug.bg_texture, &mut bgdebug.bg_framebuffer, MAX_BG_WIDTH, MAX_BG_HEIGHT);
|
||||
});
|
||||
@@ -142,7 +142,7 @@ fn initialize_bg_texture(ctx: &Context, bgdebug: &mut BgDebug) {
|
||||
if !bgdebug.is_enabled {
|
||||
return;
|
||||
}
|
||||
if let None = bgdebug.bg_texture {
|
||||
if bgdebug.bg_texture.is_none() {
|
||||
println!("Initializing BG texture {:?}", bgdebug.background);
|
||||
bgdebug.bg_texture = Some(
|
||||
ctx.load_texture(
|
||||
@@ -152,7 +152,7 @@ fn initialize_bg_texture(ctx: &Context, bgdebug: &mut BgDebug) {
|
||||
)
|
||||
);
|
||||
}
|
||||
if let None = bgdebug.char_texture {
|
||||
if bgdebug.char_texture.is_none() {
|
||||
println!("Initializing Char texture {:?}", bgdebug.background);
|
||||
bgdebug.char_texture = Some(
|
||||
ctx.load_texture(
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
use eframe::egui;
|
||||
|
||||
|
||||
pub fn build_game_window(ctx: &egui::Context) {
|
||||
egui::Window::new("Game").show(ctx, |ui| {
|
||||
ui.label("Hello World!");
|
||||
render_framebuffer(ctx, ui, &[]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
fn render_framebuffer(ctx: &egui::Context, ui: &mut egui::Ui, _framebuffer: &[u8]) {
|
||||
ui.painter().rect_filled(
|
||||
ctx.available_rect(),
|
||||
egui::Rounding::ZERO,
|
||||
egui::Color32::WHITE,
|
||||
)
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
pub mod game;
|
||||
pub mod menu;
|
||||
pub mod debug;
|
||||
|
||||
Reference in New Issue
Block a user