mirror of
https://github.com/marqs85/ossc
synced 2025-12-22 17:03:27 +03:00
misc bug fixes
* fixed shmask strength and phase adjust hotkeys * added invalidation for existing shmask and lumacode arrays upon profile load
This commit is contained in:
parent
8c0a0c181d
commit
b151be6833
@ -1002,6 +1002,11 @@ int latency_test() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void invalidate_loaded_arrays() {
|
||||
shmask_loaded_array = -1;
|
||||
loaded_lc_palette = -1;
|
||||
}
|
||||
|
||||
void update_settings(int init_setup) {
|
||||
if (init_setup || (ts.osd_enable != cs.osd_enable) || (ts.osd_status_timeout != cs.osd_status_timeout) || (ts.osd_highlight_color != cs.osd_highlight_color)) {
|
||||
osd->osd_config.enable = !!ts.osd_enable;
|
||||
|
||||
@ -145,6 +145,7 @@ int latency_test();
|
||||
|
||||
void update_sc_config();
|
||||
|
||||
void invalidate_loaded_arrays();
|
||||
void update_settings(int init_setup);
|
||||
|
||||
#endif
|
||||
|
||||
@ -59,7 +59,6 @@ extern menu_t menu_scanlines, menu_advtiming, menu_postproc;
|
||||
alt_u32 remote_code;
|
||||
alt_u8 remote_rpt, remote_rpt_prev;
|
||||
alt_u32 btn_code, btn_code_prev;
|
||||
alt_u8 phase_hotkey_enable;
|
||||
|
||||
void setup_rc()
|
||||
{
|
||||
@ -248,8 +247,8 @@ int parse_control()
|
||||
tc.shmask_str = (tc.shmask_str < SCANLINESTR_MAX) ? (tc.shmask_str + 1) : SCANLINESTR_MAX;
|
||||
|
||||
if (!menu_active) {
|
||||
strncpy((char*)osd->osd_array.data[0][0], menu_postproc.items[1].name, OSD_CHAR_COLS);
|
||||
menu_postproc.items[1].num.df(tc.shmask_str);
|
||||
strncpy((char*)osd->osd_array.data[0][0], menu_postproc.items[2].name, OSD_CHAR_COLS);
|
||||
menu_postproc.items[2].num.df(tc.shmask_str);
|
||||
strncpy((char*)osd->osd_array.data[1][0], menu_row2, OSD_CHAR_COLS);
|
||||
osd->osd_config.status_refresh = 1;
|
||||
osd->osd_row_color.mask = 0;
|
||||
@ -298,7 +297,7 @@ int parse_control()
|
||||
break;
|
||||
case RC_PHASE_MINUS:
|
||||
case RC_PHASE_PLUS:
|
||||
if (phase_hotkey_enable) {
|
||||
if (ts.phase_hotkey_enable) {
|
||||
if (i == RC_PHASE_MINUS)
|
||||
video_modes_plm[cm.id].sampler_phase = video_modes_plm[cm.id].sampler_phase ? (video_modes_plm[cm.id].sampler_phase - 1) : SAMPLER_PHASE_MAX;
|
||||
else
|
||||
|
||||
@ -261,8 +261,10 @@ int read_userdata(uint8_t entry, int dry_run) {
|
||||
}
|
||||
}
|
||||
|
||||
if (hdr.type == UDE_PROFILE)
|
||||
if (hdr.type == UDE_PROFILE) {
|
||||
invalidate_loaded_arrays();
|
||||
update_cur_vm = 1;
|
||||
}
|
||||
|
||||
strlcpy(cur_profile_name, target_profile_name, USERDATA_NAME_LEN+1);
|
||||
printf("%lu bytes read from userdata entry %u\n", bytes_read, entry);
|
||||
@ -439,8 +441,10 @@ int read_userdata_sd(uint8_t entry, int dry_run) {
|
||||
f_lseek(&p_file, bytes_read_tot);
|
||||
}
|
||||
|
||||
if (hdr.type == UDE_PROFILE)
|
||||
if (hdr.type == UDE_PROFILE) {
|
||||
invalidate_loaded_arrays();
|
||||
update_cur_vm = 1;
|
||||
}
|
||||
|
||||
strlcpy(cur_profile_name, target_profile_name, USERDATA_NAME_LEN+1);
|
||||
printf("%u bytes read from userdata entry %u\n", bytes_read_tot, entry);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user