This commit is contained in:
2023-12-25 19:58:52 -05:00
parent f896fa7018
commit a7780712d8
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ impl BgDebug {
pub fn new(background: PPUBg) -> Self { pub fn new(background: PPUBg) -> Self {
Self { Self {
is_enabled: false, is_enabled: false,
background: background, background,
bg_framebuffer: vec![0x00; MAX_BG_WIDTH * MAX_BG_HEIGHT * 4], bg_framebuffer: vec![0x00; MAX_BG_WIDTH * MAX_BG_HEIGHT * 4],
// 8x8 pixels, 16x8 characters // 8x8 pixels, 16x8 characters
char_framebuffer: vec![0x00; 8 * 8 * 16 * 8 * 4], char_framebuffer: vec![0x00; 8 * 8 * 16 * 8 * 4],
+2 -2
View File
@@ -7,7 +7,7 @@ pub fn sanitize_input(input: &mut String, is_page: bool) {
} }
let trimmed_input = input.trim_start_matches("0x"); let trimmed_input = input.trim_start_matches("0x");
*input = match is_page { *input = match is_page {
true => format!("{:02X}", u8::from_str_radix(&trimmed_input, 16).unwrap()), true => format!("{:02X}", u8::from_str_radix(trimmed_input, 16).unwrap()),
false => format!("{:04X}", u16::from_str_radix(&trimmed_input, 16).unwrap()), false => format!("{:04X}", u16::from_str_radix(trimmed_input, 16).unwrap()),
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
use eframe::egui; use eframe::egui;
use snes_core::ppu::registers::PPURegisters; use snes_core::ppu::registers::PPURegisters;
use crate::emu_state::debug_options::{PPUDebugControlOptions, BgDebug}; use crate::emu_state::debug_options::PPUDebugControlOptions;
use crate::emu_ui::debug::common::sanitize_input; use crate::emu_ui::debug::common::sanitize_input;