Removed win_status.c and the related stuff as it was not updated for a while and no longer displayed useful information.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Win32 (MinGW32) environment.
|
||||
#
|
||||
# Version: @(#)Makefile.mingw 1.0.114 2018/03/31
|
||||
# Version: @(#)Makefile.mingw 1.0.115 2018/04/26
|
||||
#
|
||||
# Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
# Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -295,9 +295,9 @@ ifneq ($(WX), n)
|
||||
LIBS += $(WX_LIBS)
|
||||
UIOBJ := wx_main.o wx_ui.o wx_stbar.o wx_render.o
|
||||
else
|
||||
UIOBJ := win_ui.o \
|
||||
UIOBJ := win_ui.o win_stbar.o \
|
||||
win_ddraw.o win_d3d.o \
|
||||
win_dialog.o win_about.o win_status.o win_stbar.o \
|
||||
win_dialog.o win_about.o \
|
||||
win_settings.o win_devconf.o win_snd_gain.o \
|
||||
win_new_floppy.o win_jsconf.o
|
||||
endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Platform support defintions for Win32.
|
||||
*
|
||||
* Version: @(#)win.h 1.0.16 2018/03/28
|
||||
* Version: @(#)win.h 1.0.17 2018/04/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -58,7 +58,7 @@ extern HANDLE ghMutex;
|
||||
extern LCID lang_id;
|
||||
extern HICON hIcon[512];
|
||||
|
||||
extern int status_is_open;
|
||||
// extern int status_is_open;
|
||||
|
||||
extern char openfilestring[260];
|
||||
extern WCHAR wopenfilestring[260];
|
||||
@@ -125,11 +125,6 @@ extern void SoundGainDialogCreate(HWND hwnd);
|
||||
extern void NewFloppyDialogCreate(HWND hwnd, int id, int part);
|
||||
|
||||
|
||||
/* Functions in win_status.c: */
|
||||
extern HWND hwndStatus;
|
||||
extern void StatusWindowCreate(HWND hwnd);
|
||||
|
||||
|
||||
/* Functions in win_stbar.c: */
|
||||
extern HWND hwndSBAR;
|
||||
extern void StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst);
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
#define BITMAP WINDOWS_BITMAP
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#undef BITMAP
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../86box.h"
|
||||
#include "../pit.h"
|
||||
#include "../mem.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../cpu/x86_ops.h"
|
||||
#ifdef USE_DYNAREC
|
||||
# include "../cpu/codegen.h"
|
||||
#endif
|
||||
#include "../device.h"
|
||||
#include "../plat.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
HWND hwndStatus = NULL;
|
||||
|
||||
|
||||
extern int sreadlnum, swritelnum, segareads, segawrites, scycles_lost;
|
||||
extern uint64_t main_time;
|
||||
static uint64_t status_time;
|
||||
|
||||
|
||||
#ifdef __amd64__
|
||||
static LRESULT CALLBACK
|
||||
#else
|
||||
static BOOL CALLBACK
|
||||
#endif
|
||||
StatusWindowProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char temp[4096];
|
||||
uint64_t new_time;
|
||||
uint64_t status_diff;
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
hwndStatus = hdlg;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case WM_USER:
|
||||
new_time = plat_timer_read();
|
||||
status_diff = new_time - status_time;
|
||||
status_time = new_time;
|
||||
sprintf(temp,
|
||||
"CPU speed : %f MIPS\n"
|
||||
"FPU speed : %f MFLOPS\n\n"
|
||||
|
||||
"Video throughput (read) : %i bytes/sec\n"
|
||||
"Video throughput (write) : %i bytes/sec\n\n"
|
||||
"Effective clockspeed : %iHz\n\n"
|
||||
"Timer 0 frequency : %fHz\n\n"
|
||||
"CPU time : %f%% (%f%%)\n"
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
"New blocks : %i\nOld blocks : %i\nRecompiled speed : %f MIPS\nAverage size : %f\n"
|
||||
"Flushes : %i\nEvicted : %i\nReused : %i\nRemoved : %i"
|
||||
#endif
|
||||
,mips,
|
||||
flops,
|
||||
segareads,
|
||||
segawrites,
|
||||
clockrate - scycles_lost,
|
||||
pit_timer0_freq(),
|
||||
((double)main_time * 100.0) / status_diff,
|
||||
((double)main_time * 100.0) / timer_freq
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
, cpu_new_blocks_latched, cpu_recomp_blocks_latched, (double)cpu_recomp_ins_latched / 1000000.0, (double)cpu_recomp_ins_latched/cpu_recomp_blocks_latched,
|
||||
cpu_recomp_flushes_latched, cpu_recomp_evicted_latched,
|
||||
cpu_recomp_reuse_latched, cpu_recomp_removed_latched
|
||||
#endif
|
||||
);
|
||||
main_time = 0;
|
||||
SendDlgItemMessage(hdlg, IDT_SDEVICE, WM_SETTEXT,
|
||||
(WPARAM)NULL, (LPARAM)temp);
|
||||
|
||||
temp[0] = 0;
|
||||
device_add_status_info(temp, 4096);
|
||||
SendDlgItemMessage(hdlg, IDT_STEXT, WM_SETTEXT,
|
||||
(WPARAM)NULL, (LPARAM)temp);
|
||||
return(TRUE);
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
hwndStatus = NULL;
|
||||
EndDialog(hdlg, 0);
|
||||
return(TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
StatusWindowCreate(HWND hwndParent)
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
hwnd = CreateDialog(hinstance, (LPCSTR)DLG_STATUS,
|
||||
hwndParent, StatusWindowProcedure);
|
||||
ShowWindow(hwnd, SW_SHOW);
|
||||
}
|
||||
|
||||
|
||||
/* Tell the Status window to update. */
|
||||
void
|
||||
ui_status_update(void)
|
||||
{
|
||||
SendMessage(hwndStatus, WM_USER, 0, 0);
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* user Interface module for WinAPI on Windows.
|
||||
*
|
||||
* Version: @(#)win_ui.c 1.0.24 2018/04/21
|
||||
* Version: @(#)win_ui.c 1.0.25 2018/04/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -315,10 +315,6 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
AboutDialogCreate(hwnd);
|
||||
break;
|
||||
|
||||
case IDM_STATUS:
|
||||
StatusWindowCreate(hwnd);
|
||||
break;
|
||||
|
||||
case IDM_UPDATE_ICONS:
|
||||
update_icons ^= 1;
|
||||
CheckMenuItem(hmenu, IDM_UPDATE_ICONS, update_icons ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
Reference in New Issue
Block a user