temp_lines = u;
}
+static int getconfigstoreline (struct zfile *z, char *option, char *value)
+{
+ char tmp[CONFIG_BLEN * 2];
+ int idx = 0;
+
+ for (;;) {
+ uae_u8 b = 0;
+ if (zfile_fread (&b, 1, 1, z) != 1)
+ return 0;
+ tmp[idx++] = b;
+ tmp[idx] = 0;
+ if (b == '\n')
+ break;
+ }
+ return separate_line (tmp, option, value);
+}
+
+
+int cfgfile_handle_custom_event (char *custom, int mode)
+{
+ char option[CONFIG_BLEN], value[CONFIG_BLEN];
+ char option2[CONFIG_BLEN], value2[CONFIG_BLEN];
+ char *tmp, *p, *nextp;
+ struct zfile *configstore = NULL;
+ int cnt = 0, cnt_ok = 0;
+
+ if (!mode) {
+ uae_u8 zero = 0;
+ configstore = zfile_fopen_empty ("configstore", 50000);
+ save_options (configstore, &currprefs, 0);
+ zfile_fwrite (&zero, 1, 1, configstore);
+ }
+
+ nextp = NULL;
+ tmp = p = xcalloc (strlen (custom) + 2, 1);
+ strcpy (tmp, custom);
+ while (p && *p) {
+ if (*p == '\"') {
+ char *p2;
+ p++;
+ p2 = p;
+ while (*p2 != '\"' && *p2 != 0)
+ p2++;
+ if (*p2 == '\"') {
+ *p2++ = 0;
+ nextp = p2 + 1;
+ if (*nextp == ' ')
+ nextp++;
+ }
+ }
+ if (separate_line (p, option, value)) {
+ cnt++;
+ if (mode) {
+ cfgfile_parse_option (&changed_prefs, option, value, 0);
+ } else {
+ zfile_fseek (configstore, 0, SEEK_SET);
+ for (;;) {
+ if (!getconfigstoreline (configstore, option2, value2))
+ break;
+ if (!strcmpi (option, option2) && !strcmpi (value, value2)) {
+ cnt_ok++;
+ break;
+ }
+ }
+ }
+ }
+ p = nextp;
+ }
+ xfree (tmp);
+ zfile_fclose (configstore);
+ if (cnt > 0 && cnt == cnt_ok)
+ return 1;
+ return 0;
+}
+
+
int cmdlineparser (char *s, char *outp[], int max)
{
int j, cnt = 0;
p->serial_demand = 0;
p->serial_hwctsrts = 1;
p->parallel_demand = 0;
+ p->parallel_postscript_emulation = 0;
+ p->parallel_postscript_detection = 0;
+ p->parallel_autoflush_time = 5;
+ p->ghostscript_parameters[0] = 0;
p->jport0 = JSEM_MICE;
p->jport1 = JSEM_KBDLAYOUT;
#ifdef PARALLEL_PORT
if (isprinter() > 0) {
doprinter (val);
- ciaaicr |= 0x10;
} else if (isprinter() < 0) {
parallel_direct_write_data (val, ciaadrb);
- ciaaicr |= 0x10;
}
+ cia_parallelack ();
#endif
break;
case 2:
* L track length in bits
*/
-static int side, direction, writing;
+static int side, direction;
static uae_u8 selected = 15, disabled;
static uae_u8 writebuffer[544 * 11 * DDHDMULT];
static void update_drive_gui (int num)
{
drive *drv = floppy + num;
+ int writ = dskdmaen == 3 && drv->state ? 1 : 0;
if (drv->state == gui_data.drive_motor[num]
&& drv->cyl == gui_data.drive_track[num]
&& side == gui_data.drive_side
&& drv->crc32 == gui_data.crc32[num]
- && ((writing && gui_data.drive_writing[num])
- || (!writing && !gui_data.drive_writing[num]))) {
+ && writ == gui_data.drive_writing[num])
return;
- }
strcpy (gui_data.df[num], currprefs.df[num]);
gui_data.crc32[num] = drv->crc32;
gui_data.drive_motor[num] = drv->state;
gui_data.drive_track[num] = drv->cyl;
gui_data.drive_side = side;
- if (!gui_data.drive_writing[num])
- gui_data.drive_writing[num] = writing;
+ gui_data.drive_writing[num] = writ;
gui_ledstate &= ~(2 << num);
if (drv->state)
gui_ledstate |= 2 << num;
INTREQ (0x8002);
dskdmaen = 0;
#ifdef DISK_DEBUG
- write_dlog("disk dma finished %08.8X\n", dskpt);
+ {
+ int dr, mfmpos = -1;
+ write_dlog("disk dma finished %08.8X MFMpos=", dskpt);
+ for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++)
+ write_log ("%d%s", floppy[dr].mfmpos, dr < MAX_FLOPPY_DRIVES - 1 ? "," : "");
+ write_log ("\n");
+ }
#endif
}
if (mfmpos == drv->indexoffset) {
diskevent_flag |= DISK_INDEXSYNC;
indexhack = 0;
- }
+ }
if (dskdmaen != 3 && mfmpos == drv->skipoffset) {
int skipcnt = disk_jitter;
while (skipcnt-- > 0) {
if (dskdmaen == 3) {
drv->tracklen = FLOPPY_WRITE_LEN * drv->ddhd * 8 * 2;
drv->trackspeed = get_floppy_speed ();
+ drv->skipoffset = -1;
updatemfmpos (drv);
}
/* Ugh. A nasty hack. Assume ADF_EXT1 tracks are always read
if ((selected & (1 << dr)) == 0)
break;
}
- if (dr == 4)
+ if (dr == 4) {
write_log ("disk %s DMA started but no drive selected!\n",
dskdmaen == 3 ? "write" : "read");
- else
+ } else {
write_log ("disk %s DMA started, drv=%x track %d mfmpos %d\n",
dskdmaen == 3 ? "write" : "read", selected ^ 15,
floppy[dr].cyl * 2 + side, floppy[dr].mfmpos);
+ update_drive_gui (dr);
+ }
write_dlog ("LEN=%04.4X (%d) SYNC=%04.4X PT=%08.8X ADKCON=%04.4X PC=%08.8X\n",
dsklength, dsklength, (adkcon & 0x400) ? dsksync : 0xffff, dskpt, adkcon, m68k_getpc());
#endif
+ for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++)
+ update_drive_gui (dr);
+
/* Try to make floppy access from Kickstart faster. */
if (dskdmaen != 2 && dskdmaen != 3)
return;
for (led = 0; led < NUM_LEDS; led++) {
int side, pos, num1 = -1, num2 = -1, num3 = -1, num4 = -1, x, off_rgb, on_rgb, c, on = 0;
if (led >= 1 && led <= 4) {
- int track = gui_data.drive_track[led-1];
- pos = 5 + (led - 1);
- if (!gui_data.drive_disabled[led - 1]) {
+ int pled = led - 1;
+ int track = gui_data.drive_track[pled];
+ pos = 5 + pled;
+ on_rgb = 0x0c0;
+ off_rgb = 0x030;
+ if (!gui_data.drive_disabled[pled]) {
num1 = -1;
num2 = track / 10;
num3 = track % 10;
- on = gui_data.drive_motor[led-1];
+ on = gui_data.drive_motor[pled];
+ if (gui_data.drive_writing[pled])
+ on_rgb = 0xc00;
}
side = gui_data.drive_side;
- on_rgb = 0x0c0;
- off_rgb = 0x030;
} else if (led == 0) {
pos = 2;
on = gui_data.powerled;
} else if (led == 6) {
pos = 3;
on = gui_data.hd;
- on_rgb = 0x00c;
+ on_rgb = on == 2 ? 0xc00 : 0x00c;
off_rgb = 0x003;
num1 = -1;
num2 = 11;
v = 0;
if (driveclick_loadresource (drvs[i], currprefs.dfxclick[i]))
v = 3;
- for (j = 0; j < CLICK_TRACKS; j++) {
- drvs[i][DS_CLICK].indexes[j] = 0;
- drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len >> DS_SHIFT;
- }
+ for (j = 0; j < CLICK_TRACKS; j++)
+ drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
} else if (currprefs.dfxclick[i] == -1) {
sprintf (tmp, "%suae_data%cdrive_click_%s", start_path, FSDB_DIR_SEPARATOR, currprefs.dfxclickexternal[i]);
v = loadsample (tmp, &drvs[i][DS_CLICK]);
return;
}
- gui_hd_led (1);
+ gui_hd_led (2);
TRACE(("ACTION_WRITE(%s,0x%lx,%ld)\n",k->aino->nname,addr,size));
if (unit->ui.readonly) {
PUT_PCK_RES1 (packet, DOS_TRUE);
}
notify_check (unit, a);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void action_set_comment (Unit * unit, dpacket packet)
a->comment = commented;
fsdb_set_file_attrs (a);
notify_check (unit, a);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void
notify_check (unit, aino);
updatedirtime (aino, 0);
PUT_PCK_RES1 (packet, make_lock (unit, aino->uniq, -2) >> 2);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void
delete_aino (unit, a);
}
PUT_PCK_RES1 (packet, DOS_TRUE);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void
} else
PUT_PCK_RES1 (packet, DOS_TRUE);
notify_check (unit, a);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void
if (a2->elock > 0 || a2->shlock > 0 || wehavekeys > 0)
de_recycle_aino (unit, a2);
PUT_PCK_RES1 (packet, DOS_TRUE);
- gui_hd_led (1);
+ gui_hd_led (2);
}
static void
extern void cfgfile_addcfgparam (char *);
extern int build_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck);
extern int cmdlineparser (char *s, char *outp[], int max);
+extern int cfgfile_handle_custom_event (char *custom, int mode);
extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
extern void fixup_prefs (struct uae_prefs *prefs);
*p = 0;
}
if (custom)
- sprintf (p, "\"%s\".%d", custom, id->flags[i + offset][j]);
+ sprintf (p, "'%s'.%d", custom, id->flags[i + offset][j]);
else if (event <= 0)
sprintf (p, "NULL");
else
*p = 0;
}
if (custom)
- sprintf (p, "\"%s\".%d", custom, kbr->flags[i][j]);
+ sprintf (p, "'%s'.%d", custom, kbr->flags[i][j]);
else if (event > 0)
sprintf (p, "%s.%d", events[event].confname, kbr->flags[i][j]);
else
static char *getstring (char **pp)
{
int i;
- static char str[100];
+ static char str[1000];
char *p = *pp;
if (*p == 0)
ie = &events[i];
if (!ie->name) {
ie = &events[0];
- if (strlen (p2) > 2 && p2[0] == '"' && p2[strlen (p2) - 1] == '"') {
+ if (strlen (p2) > 2 && p2[0] == '\'' && p2[strlen (p2) - 1] == '\'') {
custom = my_strdup (p2 + 1);
custom[strlen (custom) - 1] = 0;
}
struct input_queue_struct *iq;
int i = check_input_queue (event);
+ if (event <= 0)
+ return;
if (state < 0 && i >= 0) {
iq = &input_queue[i];
iq->nextframecnt = -1;
struct inputevent *ie;
int joy;
- if (nr <= 0) return;
+ if (nr <= 0)
+ return;
ie = &events[nr];
//write_log("'%s' %d %d\n", ie->name, state, max);
if (autofire) {
if (state)
queue_input_event (nr, state, max, currprefs.input_autofire_framecnt, 1);
- else
+ else
queue_input_event (nr, -1, 0, 0, 1);
}
switch (ie->unit)
uae_u32 mask = 1 << button;
uae_u32 omask = id2->buttonmask & mask;
uae_u32 nmask = (state ? 1 : 0) << button;
+ char *custom;
if (button >= ID_BUTTON_TOTAL)
return;
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++) {
event = id->eventid[ID_BUTTON_OFFSET + button][sublevdir[state <= 0 ? 1 : 0][i]];
- if (event <= 0)
+ custom = id->custom[ID_BUTTON_OFFSET + button][sublevdir[state <= 0 ? 1 : 0][i]];
+ if (event <= 0 && custom == NULL)
continue;
autofire = (id->flags[ID_BUTTON_OFFSET + button][sublevdir[state <= 0 ? 1 : 0][i]] & ID_FLAG_AUTOFIRE) ? 1 : 0;
if (state < 0) {
for (k = 0; k < MAX_INPUT_SUB_EVENT; k++) {/* send key release events in reverse order */
int autofire = (na->flags[j][sublevdir[state == 0 ? 1 : 0][k]] & ID_FLAG_AUTOFIRE) ? 1 : 0;
int event = na->eventid[j][sublevdir[state == 0 ? 1 : 0][k]];
+ char *custom = na->custom[j][sublevdir[state == 0 ? 1 : 0][k]];
handle_input_event (event, state, 1, autofire);
//write_log ("'%s' %d ('%s') %d\n", na->name, event, events[event].name, state);
}
if (v1 == v2)
return;
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
- handle_input_event (id->eventid[ID_AXIS_OFFSET + axis][i], state, max, id->flags[ID_AXIS_OFFSET + axis][i]);
+ handle_input_event (id->eventid[ID_AXIS_OFFSET + axis][i], state, max,
+ id->flags[ID_AXIS_OFFSET + axis][i]);
id2->states[axis] = state;
}
case AK_NP4: fs = 1; fs_xa1[1] = b; break;
case AK_NP6: fs = 1; fs_xa1[2] = b; break;
case AK_NP2: fs = 1; fs_xa1[3] = b; break;
- case AK_RCTRL: fs = 1; fs_xa1[4] = b; break;
- case AK_RALT: fs = 1; fs_xa1[5] = b; break;
+ case AK_CTRL: fs = 1; fs_xa1[4] = b; break;
+ case AK_LALT: fs = 1; fs_xa1[5] = b; break;
case AK_SPC: fs = 1; fs_xa1[6] = b; break;
}
}
}
if (fs_xa1 || fs_xa2) {
int k2 = k;
+ if (k == AK_1)
+ k2 = AK_F1;
+ if (k == AK_2)
+ k2 = AK_F2;
if (k == AK_3)
k2 = AK_LALT;
if (k == AK_4)
k2 = AK_RALT;
if (k == AK_6)
k2 = AK_DN;
- if (k == AK_1)
- k2 = AK_F1;
- if (k == AK_2)
- k2 = AK_F2;
- if (k == AK_X || k == AK_LBRACKET)
+ if (k == AK_LBRACKET || k == AK_LSH)
k2 = AK_SPC;
+ if (k == AK_RBRACKET)
+ k2 = AK_RET;
+ if (k == AK_C)
+ k2 = AK_1;
+ if (k == AK_5)
+ k2 = AK_2;
+ if (k == AK_Z)
+ k2 = AK_3;
+ if (k == AK_X)
+ k2 = AK_4;
if (k != k2)
kc = (k2 << 1) | (b ? 0 : 1);
}
if (num > 0) {
write_log ("%s (GUID=%s):\n", did->name, outGUID (&did->guid));
for (i = 0; i < num; i++)
- write_log ("%d '%s' (%d,%d)\n", mappings[i], names[i], sort[i], types ? types[i] : -1);
+ write_log ("%02.2X %0.03d '%s' (%d,%d)\n", mappings[i], mappings[i], names[i], sort[i], types ? types[i] : -1);
}
#endif
}
}
if (!e)
return 0;
- handle_input_event (e, state, 1, 0);
+ handle_input_event (e, state, 1, 0, NULL);
return 1;
}
#endif
prtbufbytes = 0;
return;
} else if (hPrt != INVALID_HANDLE_VALUE) {
- if( WritePrinter( hPrt, prtbuf, prtbufbytes, &written ) ) {
- if( written != prtbufbytes )
- write_log( "PRINTER: Only wrote %d of %d bytes!\n", written, prtbufbytes );
+ if (WritePrinter(hPrt, prtbuf, prtbufbytes, &written)) {
+ if (written != prtbufbytes)
+ write_log("PRINTER: Only wrote %d of %d bytes!\n", written, prtbufbytes);
} else {
- write_log( "PRINTER: Couldn't write data!\n" );
+ write_log("PRINTER: Couldn't write data!\n");
}
} else {
- write_log( "PRINTER: Not open!\n" );
+ write_log("PRINTER: Not open!\n");
}
prtbufbytes = 0;
}
prtopen = 1;
return;
} else if (hPrt == INVALID_HANDLE_VALUE) {
- if( OpenPrinter(currprefs.prtname, &hPrt, NULL ) ) {
+ flushprtbuf ();
+ if (OpenPrinter(currprefs.prtname, &hPrt, NULL)) {
// Fill in the structure with info about this "document."
DocInfo.pDocName = "My Document";
DocInfo.pOutputFile = NULL;
* Copyright 1998-1999 Brian King
*/
-#define PRTBUFSIZE 4096
+#define PRTBUFSIZE 65536
int setbaud (long baud );
void getserstat(int *status);
#define IDS_SOUND_4CHANNEL 242
#define IDS_HF_FS_CUSTOM 243
#define IDS_SELECTFS 244
+#define IDB_BITMAP1 246
+#define IDB_XARCADE 246
#define IDS_NUMSG_NEEDEXT2 300
#define IDS_NUMSG_NOROMKEY 301
#define IDS_NUMSG_KSROMCRCERROR 302
#define IDC_PORT1_KBDC 1311
#define IDC_PORT1_KBDD 1312
#define IDC_PORT1_KBDE 1313
-#define IDC_PORT0 1342
-#define IDC_PORT1 1343
#define IDC_MIDIFRAME 1314
#define IDC_SERPARFRAME 1315
#define IDC_SERIALFRAME 1316
#define IDC_NEW_FS 1339
#define IDC_NEW_HF 1340
#define IDC_NEW_HD 1341
+#define IDC_PORT0 1342
+#define IDC_PORT1 1343
#define IDC_PATH_NAME 1362
#define IDC_SELECTOR 1363
#define IDC_VOLUME_NAME 1364
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 245
+#define _APS_NEXT_RESOURCE_VALUE 247
#define _APS_NEXT_COMMAND_VALUE 40021
#define _APS_NEXT_CONTROL_VALUE 1699
#define _APS_NEXT_SYMED_VALUE 101
CONTROL "Keyboard Layout ""C"" []T = up, B = down, F = left, H = right, left ALT = fire",
IDC_PORT0_KBDC,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
10,198,90,10
- CONTROL "X-Arcade (left)",IDC_PORT0_KBDD,"Button",
+ CONTROL "X-Arcade (left) []#1",IDC_PORT0_KBDD,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,10,210,90,10
- CONTROL "X-Arcade (right)",IDC_PORT0_KBDE,"Button",
+ CONTROL "X-Arcade (right) []#1",IDC_PORT0_KBDE,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,10,222,90,10
COMBOBOX IDC_PORT0_JOYS,23,153,117,130,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Keyboard Layout ""C"" []T = up, B = down, F = left, H = right, left ALT = fire",
IDC_PORT1_KBDC,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
155,198,90,10
- CONTROL "X-Arcade (left)",IDC_PORT1_KBDD,"Button",
+ CONTROL "X-Arcade (left) []#1",IDC_PORT1_KBDD,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,155,210,90,10
- CONTROL "X-Arcade (right)",IDC_PORT1_KBDE,"Button",
+ CONTROL "X-Arcade (right) []#1",IDC_PORT1_KBDE,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,155,222,90,10
COMBOBOX IDC_PORT1_JOYS,168,153,123,130,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Finnish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)
+#ifdef _WIN32
+LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_XARCADE BITMAP "xarcade-winuae.bmp"
+#endif // Finnish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
break;
case WM_CLOSE:
- if (!currprefs.win32_ctrl_F11_is_quit)
- uae_quit ();
+ uae_quit ();
return 0;
case WM_WINDOWPOSCHANGED:
}
break;
+ case WM_SYSKEYDOWN:
+ if(currprefs.win32_ctrl_F11_is_quit && wParam == VK_F4)
+ return 0;
+ break;
+
case 0xff: // WM_INPUT:
handle_rawinput (lParam);
break;
}
RegQueryValueEx( hWinUAEKey, "DisplayInfo", 0, &dwType, (LPBYTE)&colortype, &dwDisplayInfoSize );
- if( colortype == 0 ) /* No color information stored in the registry yet */
+ if (colortype == 0) /* No color information stored in the registry yet */
{
- char szMessage[ 4096 ];
- char szTitle[ MAX_DPATH ];
- WIN32GUI_LoadUIString( IDS_GFXCARDCHECK, szMessage, 4096 );
- WIN32GUI_LoadUIString( IDS_GFXCARDTITLE, szTitle, MAX_DPATH );
+ char szMessage[4096];
+ char szTitle[MAX_DPATH];
+ WIN32GUI_LoadUIString(IDS_GFXCARDCHECK, szMessage, 4096);
+ WIN32GUI_LoadUIString(IDS_GFXCARDTITLE, szTitle, MAX_DPATH);
- if( MessageBox( NULL, szMessage, szTitle, MB_YESNO | MB_ICONWARNING | MB_TASKMODAL | MB_SETFOREGROUND ) == IDYES )
- {
+ if(MessageBox(NULL, szMessage, szTitle, MB_YESNO | MB_ICONWARNING | MB_TASKMODAL | MB_SETFOREGROUND ) == IDYES) {
colortype = WIN32GFX_FigurePixelFormats(0);
RegSetValueEx( hWinUAEKey, "DisplayInfo", 0, REG_DWORD, (CONST BYTE *)&colortype, sizeof( colortype ) );
}
}
- if( colortype ) {
+ if (colortype) {
/* Set the 16-bit pixel format for the appropriate modes */
- WIN32GFX_FigurePixelFormats( colortype );
+ WIN32GFX_FigurePixelFormats(colortype);
}
size = sizeof (quickstart);
RegQueryValueEx( hWinUAEKey, "QuickStartMode", 0, &dwType, (LPBYTE)&quickstart, &size );
return 0;
}
+#include "driveclick.h"
static int drvsampleres[] = {
- IDR_DRIVE_CLICK_A500_1, IDR_DRIVE_SPIN_A500_1, IDR_DRIVE_SPINND_A500_1,
- IDR_DRIVE_STARTUP_A500_1, IDR_DRIVE_SNATCH_A500_1
+ IDR_DRIVE_CLICK_A500_1, DS_CLICK,
+ IDR_DRIVE_SPIN_A500_1, DS_SPIN,
+ IDR_DRIVE_SPINND_A500_1, DS_SPINND,
+ IDR_DRIVE_STARTUP_A500_1, DS_START,
+ IDR_DRIVE_SNATCH_A500_1, DS_SNATCH,
+ -1
};
-#include "driveclick.h"
-int driveclick_loadresource (struct drvsample *s, int drivetype)
+int driveclick_loadresource (struct drvsample *sp, int drivetype)
{
int i, ok;
ok = 1;
- for (i = 0; i < DS_END; i++) {
- HRSRC res = FindResource(NULL, MAKEINTRESOURCE(drvsampleres[i]), "WAVE");
+ for (i = 0; drvsampleres[i] >= 0; i += 2) {
+ struct drvsample *s = sp + drvsampleres[i + 1];
+ HRSRC res = FindResource(NULL, MAKEINTRESOURCE(drvsampleres[i + 0]), "WAVE");
if (res != 0) {
HANDLE h = LoadResource(NULL, res);
int len = SizeofResource(NULL, res);
} else {
ok = 0;
}
- s++;
}
return ok;
}
extern int mouseactive, focus;
extern int ignore_messages_all;
#define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 4"
+#define WINUAEBETASTR " Beta 5"
extern void my_kbd_handler (int, int, int);
extern void clearallkeys(void);
}
if (strcmp (currprefs.prtname, changed_prefs.prtname) ||
+ currprefs.parallel_autoflush_time != changed_prefs.parallel_autoflush_time ||
currprefs.parallel_postscript_emulation != changed_prefs.parallel_postscript_emulation ||
currprefs.parallel_postscript_detection != changed_prefs.parallel_postscript_detection ||
strcmp (currprefs.ghostscript_parameters, changed_prefs.ghostscript_parameters)) {
strcpy (currprefs.prtname, changed_prefs.prtname);
+ currprefs.parallel_autoflush_time = changed_prefs.parallel_autoflush_time;
currprefs.parallel_postscript_emulation = changed_prefs.parallel_postscript_emulation;
currprefs.parallel_postscript_detection = changed_prefs.parallel_postscript_detection;
strcpy (currprefs.ghostscript_parameters, changed_prefs.ghostscript_parameters);
HARDDISK_ID = -1, PORTS_ID = -1, INPUT_ID = -1, MISC1_ID = -1, MISC2_ID = -1, AVIOUTPUT_ID = -1,
PATHS_ID = -1, QUICKSTART_ID = -1, ABOUT_ID = -1;
static HWND pages[MAX_C_PAGES];
+#define MAX_IMAGETOOLTIPS 10
static HWND guiDlg, panelDlg, ToolTipHWND;
static HACCEL hAccelTable;
+struct ToolTipHWNDS {
+ WNDPROC proc;
+ HWND hwnd;
+ int imageid;
+};
+static struct ToolTipHWNDS ToolTipHWNDS2[MAX_IMAGETOOLTIPS + 1];
void exit_gui (int ok)
{
}
}
nextp = full_path2 + openFileName.nFileOffset;
+ if (nextp[strlen(nextp) + 1] == 0)
+ multi = 0;
while (result && next >= 0)
{
next = -1;
RegSetValueEx(hWinUAEKey, "hdfPath", 0, REG_SZ, (CONST BYTE *)openFileName.lpstrFile, strlen(openFileName.lpstrFile) + 1);
}
}
+ if (!multi)
+ next = -1;
if (next >= 0)
wParam = next;
}
index = strlen (s) + 1;
return 1;
}
- if (!s[index])
+ if (index < 0)
+ return 0;
+ if (!s[index]) {
+ if (s[strlen (s) + 1] == 0) {
+ strcpy (out, s);
+ index = -1;
+ return 1;
+ }
return 0;
+ }
sprintf (out, "%s\\%s", s, s + index);
index += strlen (s + index) + 1;
return 1;
if (MultiDiskSelection (hDlg, -1, 0, &changed_prefs, path)) {
char dpath[MAX_DPATH];
loopmulti (path, NULL);
- while (loopmulti(path, dpath) && entry < MAX_SPARE_DRIVES - 1) {
+ while (loopmulti(path, dpath) && entry < MAX_SPARE_DRIVES) {
strcpy (workprefs.dfxlist[entry], dpath);
entry++;
}
return 1;
}
+static int ToolTipImageIDs[] = { 1, IDB_XARCADE, -1 };
+
+static WNDPROC ToolTipWndProcOld;
+static long FAR PASCAL ToolTipWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ RECT r1;
+ POINT p1;
+ PAINTSTRUCT ps;
+ HBITMAP bm;
+ BITMAP binfo;
+ HDC hdc, memdc;
+ int w, h, i;
+
+ for (i = 0; ToolTipHWNDS2[i].hwnd; i++) {
+ if (hwnd == ToolTipHWNDS2[i].hwnd)
+ break;
+ }
+ if (!ToolTipHWNDS2[i].hwnd)
+ return CallWindowProc (ToolTipHWNDS2[i].proc, hwnd, message, wParam, lParam);
+
+ switch (message)
+ {
+ case WM_PAINT:
+ bm = LoadBitmap (hInst, MAKEINTRESOURCE (ToolTipHWNDS2[i].imageid));
+ GetObject (bm, sizeof (binfo), &binfo);
+ w = binfo.bmWidth;
+ h = binfo.bmHeight;
+ GetWindowRect (hwnd, &r1);
+ GetCursorPos (&p1);
+ r1.right = r1.left + w;
+ r1.bottom = r1.top + h;
+ ShowWindow (hwnd, SW_SHOWNA);
+ MoveWindow (hwnd, r1.left, r1.top, r1.right - r1.left, r1.bottom - r1.top, TRUE);
+ hdc = GetDC (hwnd);
+ memdc = CreateCompatibleDC (hdc);
+ SelectObject (memdc, bm);
+ BeginPaint (hwnd, &ps);
+ SetBkMode (ps.hdc, TRANSPARENT);
+ BitBlt (hdc, 0, 0, w, h, memdc, 0, 0, SRCCOPY);
+ DeleteObject (bm);
+ EndPaint (hwnd, &ps);
+ DeleteDC (memdc);
+ ReleaseDC (hwnd, hdc);
+ return FALSE;
+ case WM_PRINT:
+ PostMessage (hwnd, WM_PAINT, 0, 0);
+ return TRUE;
+ }
+ return CallWindowProc (ToolTipHWNDS2[i].proc, hwnd, message, wParam, lParam);
+}
+
static BOOL CALLBACK childenumproc (HWND hwnd, LPARAM lParam)
{
TOOLINFO ti;
SendMessage (hwnd, WM_GETTEXT, (WPARAM)sizeof (tmp), (LPARAM)tmp);
p = strchr (tmp, '[');
if (strlen (tmp) > 0 && p && strlen(p) > 2 && p[1] == ']') {
+ int imageid = 0;
*p++ = 0;
*p++ = 0;
if (p[0] == ' ')
*p++;
+ if (p[0] == '#')
+ imageid = atol (p + 1);
tmp[strlen(tmp) - 1] = 0;
- SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM)tmp);
ti.cbSize = sizeof (TOOLINFO);
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
ti.hwnd = GetParent (hwnd);
ti.hinst = hInst;
ti.uId = (UINT)hwnd;
ti.lpszText = p;
- SendMessage(ToolTipHWND, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+ if (imageid > 0) {
+ int idx, i;
+
+ idx = 0;
+ while (ToolTipHWNDS2[idx].hwnd)
+ idx++;
+ for (i = 0; ToolTipImageIDs[i] >= 0; i += 2) {
+ if (ToolTipImageIDs[i] == imageid)
+ break;
+ }
+ if (ToolTipImageIDs[i] >= 0 && idx < MAX_IMAGETOOLTIPS) {
+ HWND ToolTipHWND2 = CreateWindowEx (WS_EX_TOPMOST,
+ TOOLTIPS_CLASS, NULL,
+ WS_POPUP | TTS_NOPREFIX,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ panelDlg, NULL, hInst, NULL);
+ ToolTipHWNDS2[idx].hwnd = ToolTipHWND2;
+ ToolTipHWNDS2[idx+1].hwnd = NULL;
+ ToolTipHWNDS2[idx].proc = (WNDPROC)GetWindowLongPtr (ToolTipHWND2, GWL_WNDPROC);
+ ToolTipHWNDS2[idx].imageid = ToolTipImageIDs[i + 1];
+ SetWindowLongPtr (ToolTipHWND2, GWL_WNDPROC, (LONG_PTR)ToolTipWndProc);
+ SetWindowPos (ToolTipHWND2, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ SendMessage(ToolTipHWND2, TTM_SETDELAYTIME, (WPARAM)TTDT_AUTOPOP, (LPARAM)MAKELONG(20000, 0));
+ SendMessage(ToolTipHWND2, TTM_SETMAXTIPWIDTH, 0, 400);
+ SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM)tmp);
+ SendMessage(ToolTipHWND2, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+ }
+ } else {
+ SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM)tmp);
+ SendMessage(ToolTipHWND, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+ }
return 1;
}
p = strchr (tmp, ']');
{
static HWND hwndTT;
RECT r1c, r1w, r2c, r2w, r3c, r3w;
- int w, h, pw, ph, x , y;
+ int w, h, pw, ph, x , y, i;
EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), full_property_sheet ? FALSE : TRUE);
EnableWindow (GetDlgItem (guiDlg, IDOK), TRUE);
DestroyWindow (ToolTipHWND);
ToolTipHWND = NULL;
}
+ for (i = 0; ToolTipHWNDS2[i].hwnd; i++) {
+ DestroyWindow (ToolTipHWNDS2[i].hwnd);
+ ToolTipHWNDS2[i].hwnd = NULL;
+ }
hAccelTable = NULL;
if (id < 0) {
if (!isfullscreen ()) {
panelDlg, NULL, hInst, NULL);
SetWindowPos (ToolTipHWND, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+
#if 0
SendMessage(ToolTipHWND, TTM_SETDELAYTIME, (WPARAM)TTDT_INITIAL, (LPARAM)MAKELONG(100, 0));
SendMessage(ToolTipHWND, TTM_SETDELAYTIME, (WPARAM)TTDT_RESHOW, (LPARAM)MAKELONG(0, 0));
#endif
SendMessage(ToolTipHWND, TTM_SETDELAYTIME, (WPARAM)TTDT_AUTOPOP, (LPARAM)MAKELONG(20000, 0));
SendMessage(ToolTipHWND, TTM_SETMAXTIPWIDTH, 0, 400);
+
EnumChildWindows (panelDlg, &childenumproc, (LPARAM)NULL);
SendMessage (panelDlg, WM_NULL, 0, 0);
AdditionalIncludeDirectories="\projects\winuae\src\od-win32\resources;$(NoInherit)"/>
</FileConfiguration>
</File>
+ <File
+ RelativePath="..\resources\xarcade-winuae.bmp">
+ </File>
</Filter>
<Filter
Name="win32"