Merge pull request #2453 from elyosh/qtstatusbar
qt: switch to polling for status bar updating
This commit is contained in:
32
src/include/86box/machine_status.h
Normal file
32
src/include/86box/machine_status.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef EMU_MACHINE_STATUS_H
|
||||
#define EMU_MACHINE_STATUS_H
|
||||
|
||||
typedef struct {
|
||||
atomic_bool_t empty;
|
||||
atomic_bool_t active;
|
||||
} dev_status_empty_active_t;
|
||||
|
||||
typedef struct {
|
||||
atomic_bool_t active;
|
||||
} dev_status_active_t;
|
||||
|
||||
typedef struct {
|
||||
atomic_bool_t empty;
|
||||
} dev_status_empty_t;
|
||||
|
||||
typedef struct {
|
||||
dev_status_empty_active_t fdd[FDD_NUM];
|
||||
dev_status_empty_active_t cdrom[CDROM_NUM];
|
||||
dev_status_empty_active_t zip[ZIP_NUM];
|
||||
dev_status_empty_active_t mo[MO_NUM];
|
||||
dev_status_empty_active_t cassette;
|
||||
dev_status_active_t hdd[HDD_BUS_USB];
|
||||
dev_status_active_t net;
|
||||
dev_status_empty_t cartridge[2];
|
||||
} machine_status_t;
|
||||
|
||||
extern machine_status_t machine_status;
|
||||
|
||||
extern void machine_status_init();
|
||||
|
||||
#endif /*EMU_MACHINE_STATUS_H*/
|
||||
@@ -70,10 +70,12 @@ extern int strnicmp(const char* s1, const char* s2, size_t n);
|
||||
#ifdef __cplusplus
|
||||
#include <atomic>
|
||||
#define atomic_flag_t std::atomic_flag
|
||||
#define atomic_bool_t std::atomic_bool
|
||||
extern "C" {
|
||||
#else
|
||||
#include <stdatomic.h>
|
||||
#define atomic_flag_t atomic_flag
|
||||
#define atomic_bool_t atomic_bool
|
||||
#endif
|
||||
|
||||
/* Global variables residing in the platform module. */
|
||||
|
||||
@@ -70,8 +70,8 @@ extern void ui_sb_update_panes(void);
|
||||
extern void ui_sb_update_text(void);
|
||||
extern void ui_sb_update_tip(int meaning);
|
||||
extern void ui_sb_timer_callback(int pane);
|
||||
extern void ui_sb_update_icon(int tag, int val);
|
||||
extern void ui_sb_update_icon_state(int tag, int active);
|
||||
extern void ui_sb_update_icon(int tag, int active);
|
||||
extern void ui_sb_update_icon_state(int tag, int state);
|
||||
extern void ui_sb_set_text_w(wchar_t *wstr);
|
||||
extern void ui_sb_set_text(char *str);
|
||||
extern void ui_sb_bugui(char *str);
|
||||
|
||||
Reference in New Issue
Block a user