Minor refactoring
This commit is contained in:
parent
a7bdb6111b
commit
187e994189
5 changed files with 18 additions and 15 deletions
|
@ -69,9 +69,9 @@ typedef enum
|
|||
#define RENDER_SIGNAL_PARTIAL 1
|
||||
#define RENDER_SIGNAL_FRAME_DONE 2
|
||||
#define RENDER_SIGNAL_QUIT 3
|
||||
static uae_thread_id render_tid = 0;
|
||||
static smp_comm_pipe *volatile render_pipe = 0;
|
||||
static uae_sem_t render_sem = 0;
|
||||
static uae_thread_id render_tid = nullptr;
|
||||
static smp_comm_pipe *volatile render_pipe = nullptr;
|
||||
static uae_sem_t render_sem = nullptr;
|
||||
static bool volatile render_thread_busy = false;
|
||||
#endif
|
||||
|
||||
|
@ -4029,14 +4029,14 @@ void vsync_handle_redraw(int long_field, int lof_changed, uae_u16 bplcon0p, uae_
|
|||
while (render_thread_busy)
|
||||
sleep_micros(1);
|
||||
write_comm_pipe_u32(render_pipe, RENDER_SIGNAL_QUIT, 1);
|
||||
while (render_tid != 0) {
|
||||
while (render_tid != nullptr) {
|
||||
sleep_micros(10);
|
||||
}
|
||||
destroy_comm_pipe(render_pipe);
|
||||
xfree(render_pipe);
|
||||
render_pipe = 0;
|
||||
render_pipe = nullptr;
|
||||
uae_sem_destroy(&render_sem);
|
||||
render_sem = 0;
|
||||
render_sem = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4311,8 +4311,8 @@ void drawing_init(void)
|
|||
#ifdef PICASSO96
|
||||
if (!isrestore())
|
||||
{
|
||||
ad->picasso_on = 0;
|
||||
ad->picasso_requested_on = 0;
|
||||
ad->picasso_on = false;
|
||||
ad->picasso_requested_on = false;
|
||||
gfx_set_picasso_state(0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -573,9 +573,6 @@ void uae_reset(int hardreset, int keyboardreset)
|
|||
if (hardreset)
|
||||
quit_program = -UAE_RESET_HARD;
|
||||
}
|
||||
struct amigadisplay* ad = &adisplays;
|
||||
ad->picasso_requested_on = false;
|
||||
ad->picasso_on = false;
|
||||
}
|
||||
|
||||
void uae_quit(void)
|
||||
|
|
|
@ -1305,6 +1305,11 @@ void target_addtorecent(const TCHAR* name, int t)
|
|||
void target_reset(void)
|
||||
{
|
||||
clipboard_reset();
|
||||
|
||||
auto* const ad = &adisplays;
|
||||
ad->picasso_requested_on = false;
|
||||
ad->picasso_on = false;
|
||||
|
||||
}
|
||||
|
||||
bool target_can_autoswitchdevice(void)
|
||||
|
|
|
@ -505,6 +505,10 @@ bool mapped_malloc(addrbank* ab)
|
|||
|
||||
void mapped_free(addrbank* ab)
|
||||
{
|
||||
ab->flags &= ~ABFLAG_MAPPED;
|
||||
if (ab->baseaddr == nullptr)
|
||||
return;
|
||||
|
||||
if (ab->label != nullptr && !strcmp(ab->label, "filesys") && ab->baseaddr != nullptr)
|
||||
{
|
||||
write_log("mapped_free(): 0x%08x - 0x%08x (0x%08x - 0x%08x) -> %s (%s)\n",
|
||||
|
|
|
@ -1105,9 +1105,7 @@ void gui_widgets_init()
|
|||
|
||||
void gui_widgets_halt()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; categories[i].category != nullptr; ++i)
|
||||
for (auto i = 0; categories[i].category != nullptr; ++i)
|
||||
{
|
||||
if (categories[i].ExitFunc != nullptr)
|
||||
(*categories[i].ExitFunc)();
|
||||
|
@ -1217,7 +1215,6 @@ void run_gui()
|
|||
// Prepare everything for Reset of Amiga
|
||||
//--------------------------------------------------
|
||||
currprefs.nr_floppies = changed_prefs.nr_floppies;
|
||||
screen_is_picasso = 0;
|
||||
|
||||
if (gui_rtarea_flags_onenter != gui_create_rtarea_flag(&changed_prefs))
|
||||
quit_program = -UAE_RESET_HARD; // Hardreset required...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue