Skip to content

Commit

Permalink
Fixed Z3 RAM would not get set correctly on reset
Browse files Browse the repository at this point in the history
- Fixes bug where workbench background would be corrupt when switching from one RTG config to another
- Fixes CDTV would not show kickstart screen #658
  • Loading branch information
midwan committed Jul 12, 2020
1 parent ca30524 commit 45d5430
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/osdep/amiberry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,32 @@ void target_addtorecent(const TCHAR* name, int t)
{
}


void target_reset(void)
void target_reset()
{
clipboard_reset();

auto* const ad = &adisplays;
ad->picasso_requested_on = false;
ad->picasso_on = false;


if (currprefs.z3fastmem[0].size != changed_prefs.z3fastmem[0].size)
{
currprefs.z3fastmem[0].size = changed_prefs.z3fastmem[0].size;
z3fastmem_bank[0].reserved_size = 0;
z3fastmem_bank[0].mask = 0;
z3fastmem_bank[0].baseaddr = NULL;

mapped_free(&z3fastmem_bank[0]);

z3fastmem_bank[0].allocated_size = 0;
z3fastmem_bank[0].reserved_size = currprefs.z3fastmem[0].size;
if (currprefs.z3fastmem[0].size) return;

z3fastmem_bank[0].mask = currprefs.z3fastmem[0].size - 1;
z3fastmem_bank[0].label = _T("*");
mapped_malloc(&z3fastmem_bank[0]);
changed_prefs.z3fastmem[0].size = currprefs.z3fastmem[0].size;
}
}

bool target_can_autoswitchdevice(void)
Expand Down

0 comments on commit 45d5430

Please sign in to comment.