cfgfile_write (f, "override_dga_address=0x%08x\n", p->override_dga_address);
for (i = 0; i < 2; i++) {
- int v = p->jports[i].id;
+ struct jport *jp = &p->jports[i];
+ int v = jp->id;
char tmp1[100], tmp2[50];
if (v < 0) {
strcpy (tmp2, "none");
}
sprintf (tmp1, "joyport%d=%s\n", i, tmp2);
cfgfile_write (f, tmp1);
+ if (jp->name) {
+ sprintf (tmp1, "joyportfriendlyname%d=%s\n", i, jp->name);
+ cfgfile_write (f, tmp1);
+ }
+ if (jp->configname) {
+ sprintf (tmp1, "joyportname%d=%s\n", i, jp->configname);
+ cfgfile_write (f, tmp1);
+ }
}
cfgfile_write (f, "bsdsocket_emu=%s\n", p->socket_emu ? "true" : "false");
return 1;
}
+ if (strcmp (option, "joyportfriendlyname0") == 0 || strcmp (option, "joyportfriendlyname1") == 0) {
+ inputdevice_joyport_config (p, value, strcmp (option, "joyportfriendlyname0") == 0 ? 0 : 1, 2);
+ return 1;
+ }
+ if (strcmp (option, "joyportname0") == 0 || strcmp (option, "joyportname1") == 0) {
+ inputdevice_joyport_config (p, value, strcmp (option, "joyportname0") == 0 ? 0 : 1, 1);
+ return 1;
+ }
+
if (strcmp (option, "joyport0") == 0 || strcmp (option, "joyport1") == 0) {
- int port = strcmp (option, "joyport0") == 0 ? 0 : 1;
- int start = -1, got = 0;
- char *pp = 0;
- if (strncmp (value, "kbd", 3) == 0) {
- start = JSEM_KBDLAYOUT;
- pp = value + 3;
- got = 1;
- } else if (strncmp (value, "joy", 3) == 0) {
- start = JSEM_JOYS;
- pp = value + 3;
- got = 1;
- } else if (strncmp (value, "mouse", 5) == 0) {
- start = JSEM_MICE;
- pp = value + 5;
- got = 1;
- } else if (strcmp (value, "none") == 0) {
- got = 2;
- }
- if (got) {
- if (pp) {
- int v = atol (pp);
- if (start >= 0) {
- if (start == JSEM_KBDLAYOUT)
- v--;
- if (v >= 0) {
- start += v;
- got = 2;
- }
- }
- }
- if (got == 2) {
- p->jports[port].id = start;
- }
- }
+ inputdevice_joyport_config (p, value, strcmp (option, "joyport0") == 0 ? 0 : 1, 0);
return 1;
}
void check_prefs_changed_custom (void)
{
currprefs.gfx_framerate = changed_prefs.gfx_framerate;
- if (inputdevice_config_change_test ()) {
+ if (inputdevice_config_change_test ())
inputdevice_copyconfig (&changed_prefs, &currprefs);
- inputdevice_updateconfig (&currprefs);
- }
currprefs.immediate_blits = changed_prefs.immediate_blits;
currprefs.collision_level = changed_prefs.collision_level;
#ifdef AGA
if (brdsprt && dip_for_drawing->nr_sprites) {
int min = visible_right_border, max = visible_left_border, i;
+ int posdiff = sprite_buffer_res - bplres;
for (i = 0; i < dip_for_drawing->nr_sprites; i++) {
int x;
x = curr_sprite_entries[dip_for_drawing->first_sprite_entry + i].pos;
- if (x < min) min = x;
+ if (x < min)
+ min = x;
x = curr_sprite_entries[dip_for_drawing->first_sprite_entry + i].max;
- if (x > max) max = x;
+ if (x > max)
+ max = x;
+ }
+ min += (DIW_DDF_OFFSET - DISPLAY_LEFT_SHIFT) << sprite_buffer_res;
+ max += (DIW_DDF_OFFSET - DISPLAY_LEFT_SHIFT) << sprite_buffer_res;
+ if (posdiff < 0) {
+ min <<= -posdiff;
+ max <<= -posdiff;
+ } else {
+ min >>= posdiff;
+ max >>= posdiff;
}
- min += (DIW_DDF_OFFSET - DISPLAY_LEFT_SHIFT) << (2 - lores_shift);
- max += (DIW_DDF_OFFSET - DISPLAY_LEFT_SHIFT) << (2 - lores_shift);
if (min < playfield_start)
playfield_start = min;
if (playfield_start < visible_left_border)
adjust_drawing_colors (dp_for_drawing->ctable, 0);
#ifdef AGA /* this makes things complex.. */
- if (brdsprt && (currprefs.chipset_mask & CSMASK_AGA) && dip_for_drawing->nr_sprites > 0) {
+ if (brdsprt && dip_for_drawing->nr_sprites > 0) {
dosprites = 1;
pfield_expand_dp_bplcon ();
pfield_init_linetoscr ();
{
TRACE(("ACTION_MORE_CACHE()\n"));
PUT_PCK_RES1 (packet, 50); /* bug but AmigaOS expects it */
- flush_cache(unit, 0);
+ if (GET_PCK_ARG1 (packet) != 0)
+ flush_cache(unit, 0);
}
static void
int (*get_widget_num)(int);
int (*get_widget_type)(int,int,char*,uae_u32*);
int (*get_widget_first)(int,int);
+ int (*get_flags)(int);
};
extern struct inputdevice_functions idev[3];
extern struct inputdevice_functions inputdevicefunc_joystick;
extern void write_inputdevice_config (struct uae_prefs *p, struct zfile *f);
extern void read_inputdevice_config (struct uae_prefs *p, char *option, char *value);
extern void reset_inputdevice_config (struct uae_prefs *pr);
+extern void inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type);
extern void inputdevice_init (void);
extern void inputdevice_close (void);
*
* joystick/mouse emulation
*
- * Copyright 2001-2006 Toni Wilen
+ * Copyright 2001-2007 Toni Wilen
*
* new fetures:
* - very configurable (and very complex to configure :)
#include "autoconf.h"
#include "rp.h"
+static int allmode = 1;
+
int inputdevice_logging = 0;
#define DIR_LEFT 1
xfree (id->configname);
xfree (id->name);
memset (id, 0, sizeof (struct uae_input_device));
- id->enabled = 1;
}
void read_inputdevice_config (struct uae_prefs *pr, char *option, char *value)
if (!strcmp (p2, "empty")) {
clear_id (id);
+ id->enabled = 1;
return;
}
magicmouse_ibase = 0;
}
-static int switchdevice (struct uae_input_device *id, int num)
+static int getoldport (struct uae_input_device *id)
{
-#if 0
- struct inputevent *ie, *ie2;
- int i, j, k, event, unit;
-#endif
+ int i, j;
+
+ for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
+ for (j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
+ int evt = id->eventid[i][j];
+ if (evt > 0) {
+ int unit = events[evt].unit;
+ if (unit >= 1 && unit <= 4)
+ return unit;
+ }
+ }
+ }
+ return -1;
+}
+
+static int switchdevice (struct uae_input_device *id, int num, int button)
+{
+ int i;
+ int ismouse = 0;
+ int newport = 0;
+ char *name = NULL;
if (num >= 4)
return 0;
- return 0;
- write_log ("switchdev %d\n", num);
- if (!currprefs.input_selected_setting)
+ if (!button)
+ return 0;
+ for (i = 0; i < MAX_INPUT_DEVICES; i++) {
+ if (id == &joysticks[i]) {
+ name = idev[IDTYPE_JOYSTICK].get_uniquename (i);
+ newport = num == 0 ? 1 : 0;
+ if (currprefs.input_selected_setting && idev[IDTYPE_JOYSTICK].get_flags (i))
+ return 0;
+ }
+ if (id == &mice[i]) {
+ ismouse = 1;
+ name = idev[IDTYPE_MOUSE].get_uniquename (i);
+ newport = num == 0 ? 0 : 1;
+ if (currprefs.input_selected_setting && idev[IDTYPE_MOUSE].get_flags (i))
+ return 0;
+ }
+ }
+ if (!name)
return 0;
+ write_log ("inputdevice change request '%s':%d->%d\n", name, num, newport);
+ if (!currprefs.input_selected_setting) {
+ if (num == 0 || num == 1) {
+ if (name) {
+ inputdevice_joyport_config (&changed_prefs, name, newport, 2);
+ inputdevice_copyconfig (&changed_prefs, &currprefs);
+ return 1;
+ }
+ }
+ return 0;
+ } else {
+ int oldport = getoldport (id);
+ int i, j, k, evt;
+ struct inputevent *ie, *ie2;
-#if 0
- id->enabled = 1;
- for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
- for (j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
- event = id->eventid[i][j];
- if (event <= 0)
- continue;
- ie = &events[event];
- if (ie->unit <= 0)
- continue;
- unit = ie->unit;
- k = 1;
- while (events[k].confname) {
- ie2 = &events[k];
- if (ie2->type == ie->type && ie2->data == ie->data && ie2->allow_mask == ie->allow_mask) {
- id->eventid[i][j] = k;
- break;
+ if (oldport <= 0)
+ return 0;
+ newport++;
+ /* do not switch if "supermouse" mouse is already selected
+ * in same port and new device is also mouse.
+ */
+ if (ismouse) {
+ for (i = 0; i < MAX_INPUT_SETTINGS + 1; i++) {
+ if (getoldport (&mice[i]) == newport && mice[i].enabled) {
+ if (idev[IDTYPE_MOUSE].get_flags (i))
+ return 0;
}
- k++;
}
}
+ for (i = 0; i < MAX_INPUT_SETTINGS + 1; i++) {
+ if (getoldport (&joysticks[i]) == newport)
+ joysticks[i].enabled = 0;
+ if (getoldport (&mice[i]) == newport)
+ mice[i].enabled = 0;
+ }
+ id->enabled = 1;
+ for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
+ for (j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
+ evt = id->eventid[i][j];
+ if (evt <= 0)
+ continue;
+ ie = &events[evt];
+ if (ie->unit == oldport) {
+ k = 1;
+ while (events[k].confname) {
+ ie2 = &events[k];
+ if (ie2->type == ie->type && ie2->data == ie->data && ie2->allow_mask == ie->allow_mask && ie2->unit == newport) {
+ id->eventid[i][j] = k;
+ break;
+ }
+ k++;
+ }
+ } else if (ie->unit == newport) {
+ k = 1;
+ while (events[k].confname) {
+ ie2 = &events[k];
+ if (ie2->type == ie->type && ie2->data == ie->data && ie2->allow_mask == ie->allow_mask && ie2->unit == oldport) {
+ id->eventid[i][j] = k;
+ break;
+ }
+ k++;
+ }
+ }
+ }
+ }
+ inputdevice_copyconfig (&currprefs, &changed_prefs);
+ inputdevice_copyconfig (&changed_prefs, &currprefs);
+ return 1;
}
-#endif
return 0;
}
if (!id->enabled) {
if (state)
- switchdevice (id, button);
+ switchdevice (id, button, 1);
return;
}
if (button >= ID_BUTTON_TOTAL)
int joy, i;
int used[4] = { 0, 0, 0, 0};
+ for (i = 0; i < 2; i++) {
+ xfree (prefs->jports[i].name);
+ xfree (prefs->jports[i].configname);
+ prefs->jports[i].name = NULL;
+ prefs->jports[i].configname = NULL;
+ }
compatibility_device[0] = -1;
compatibility_device[1] = -1;
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
- memset (&mice[i], 0, sizeof (*mice));
- memset (&joysticks[i], 0, sizeof (*joysticks));
+ clear_id (&mice[i]);
+ clear_id (&joysticks[i]);
}
if ((joy = jsem_ismouse (0, prefs)) >= 0) {
input_get_default_mouse (mice, joy, 0);
mice[joy].enabled = 1;
+ prefs->jports[0].name = my_strdup (idev[IDTYPE_MOUSE].get_friendlyname (joy));
+ prefs->jports[0].configname = my_strdup (idev[IDTYPE_MOUSE].get_uniquename (joy));
}
if ((joy = jsem_ismouse (1, prefs)) >= 0) {
input_get_default_mouse (mice, joy, 1);
mice[joy].enabled = 1;
+ prefs->jports[1].name = my_strdup (idev[IDTYPE_MOUSE].get_friendlyname (joy));
+ prefs->jports[1].configname = my_strdup (idev[IDTYPE_MOUSE].get_uniquename (joy));
}
joy = jsem_isjoy (1, prefs);
used[joy] = 1;
input_get_default_joystick (joysticks, joy, 1);
joysticks[joy].enabled = 1;
+ prefs->jports[1].name = my_strdup (idev[IDTYPE_JOYSTICK].get_friendlyname (joy));
+ prefs->jports[1].configname = my_strdup (idev[IDTYPE_JOYSTICK].get_uniquename (joy));
}
joy = jsem_isjoy (0, prefs);
used[joy] = 1;
input_get_default_joystick (joysticks, joy, 0);
joysticks[joy].enabled = 1;
- }
+ prefs->jports[0].name = my_strdup (idev[IDTYPE_JOYSTICK].get_friendlyname (joy));
+ prefs->jports[0].configname = my_strdup (idev[IDTYPE_JOYSTICK].get_uniquename (joy));
+ }
for (joy = 0; used[joy]; joy++);
if (JSEM_ISANYKBD (0, prefs)) {
}
}
-/* called when devices get inserted or removed */
-void inputdevice_devicechange (struct uae_prefs *prefs)
-{
- int acc = input_acquired;
-
- inputdevice_unacquire ();
- idev[IDTYPE_JOYSTICK].close ();
- idev[IDTYPE_MOUSE].close ();
- idev[IDTYPE_KEYBOARD].close ();
- idev[IDTYPE_JOYSTICK].init ();
- idev[IDTYPE_MOUSE].init ();
- idev[IDTYPE_KEYBOARD].init ();
- matchdevices (&idev[IDTYPE_MOUSE], mice);
- matchdevices (&idev[IDTYPE_JOYSTICK], joysticks);
- matchdevices (&idev[IDTYPE_KEYBOARD], keyboards);
- if (acc)
- inputdevice_acquire ();
-}
-
void inputdevice_updateconfig (struct uae_prefs *prefs)
{
int i;
mousehack_enable();
}
+/* called when devices get inserted or removed */
+void inputdevice_devicechange (struct uae_prefs *prefs)
+{
+ int acc = input_acquired;
+
+ inputdevice_unacquire ();
+ idev[IDTYPE_JOYSTICK].close ();
+ idev[IDTYPE_MOUSE].close ();
+ idev[IDTYPE_KEYBOARD].close ();
+ idev[IDTYPE_JOYSTICK].init ();
+ idev[IDTYPE_MOUSE].init ();
+ idev[IDTYPE_KEYBOARD].init ();
+ if (prefs == &currprefs) {
+ inputdevice_copyconfig (&changed_prefs, &currprefs);
+ if (acc)
+ inputdevice_acquire ();
+ } else {
+ matchdevices (&idev[IDTYPE_MOUSE], mice);
+ matchdevices (&idev[IDTYPE_JOYSTICK], joysticks);
+ matchdevices (&idev[IDTYPE_KEYBOARD], keyboards);
+ }
+}
+
static void set_kbr_default (struct uae_prefs *p, int index, int num)
{
int i, j, k, l;
inputdevice_unacquire ();
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
- if (use_joysticks[i])
+ if (use_joysticks[i] || (allmode && !idev[IDTYPE_JOYSTICK].get_flags (i)))
idev[IDTYPE_JOYSTICK].acquire (i, 0);
}
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
- if (use_mice[i])
+ if (use_mice[i] || (allmode && !idev[IDTYPE_MOUSE].get_flags (i)))
idev[IDTYPE_MOUSE].acquire (i, 0);
}
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
idev[IDTYPE_KEYBOARD].unacquire (i);
}
-static int ignoreoldinput(int joy)
+static int ignoreoldinput (int joy)
{
+ if (!use_joysticks[joy])
+ return 0;
if (currprefs.input_selected_setting == 0) {
if (jsem_isjoy (0, &currprefs) != joy && jsem_isjoy (1, &currprefs) != joy)
return 1;
{
if (ignoreoldinput(joy)) {
if (state)
- switchdevice (&joysticks[joy], button);
+ switchdevice (&joysticks[joy], button, 1);
return;
}
setbuttonstateall (&joysticks[joy], &joysticks2[joy], button, state ? 1 : 0);
return;
if (!joysticks[joy].enabled || ignoreoldinput(joy)) {
if (v1)
- switchdevice (&joysticks[joy], axis * 2 + (v1 < 0 ? 0 : 1));
+ switchdevice (&joysticks[joy], axis * 2 + (v1 < 0 ? 0 : 1), 0);
return;
}
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
return -1;
return v;
}
+
+void inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type)
+{
+ switch (type)
+ {
+ case 1:
+ case 2:
+ {
+ int i, j;
+ for (j = 0; j < 2; j++) {
+ struct inputdevice_functions *idf;
+ int type = IDTYPE_MOUSE;
+ int idnum = JSEM_MICE;
+ if (j == 0) {
+ type = IDTYPE_JOYSTICK;
+ idnum = JSEM_JOYS;
+ }
+ idf = &idev[type];
+ for (i = 0; i < idf->get_num (); i++) {
+ char *name1 = idf->get_friendlyname (i);
+ char *name2 = idf->get_uniquename (i);
+ if ((name1 && !strcmp (name1, value)) || (name2 && !strcmp (name2, value))) {
+ p->jports[portnum].id = idnum + i;
+ return;
+ }
+ }
+ }
+ }
+ break;
+ case 0:
+ {
+ int start = -1, got = 0;
+ char *pp = 0;
+ if (strncmp (value, "kbd", 3) == 0) {
+ start = JSEM_KBDLAYOUT;
+ pp = value + 3;
+ got = 1;
+ } else if (strncmp (value, "joy", 3) == 0) {
+ start = JSEM_JOYS;
+ pp = value + 3;
+ got = 1;
+ } else if (strncmp (value, "mouse", 5) == 0) {
+ start = JSEM_MICE;
+ pp = value + 5;
+ got = 1;
+ } else if (strcmp (value, "none") == 0) {
+ got = 2;
+ }
+ if (got) {
+ if (pp) {
+ int v = atol (pp);
+ if (start >= 0) {
+ if (start == JSEM_KBDLAYOUT && v > 0)
+ v--;
+ if (v >= 0) {
+ start += v;
+ got = 2;
+ }
+ }
+ }
+ if (got == 2) {
+ p->jports[portnum].id = start;
+ }
+ }
+ }
+ break;
+ }
+}
\ No newline at end of file
}
}
+static int get_mouse_flags (int num)
+{
+ if (di_mouse[num].rawinput)
+ return 0;
+ if (di_mouse[num].catweasel)
+ return 0;
+ if (di_mouse[num].wininput == 1 && !rawinput_available)
+ return 0;
+ return 1;
+}
struct inputdevice_functions inputdevicefunc_mouse = {
init_mouse, close_mouse, acquire_mouse, unacquire_mouse, read_mouse,
get_mouse_num, get_mouse_friendlyname, get_mouse_uniquename,
get_mouse_widget_num, get_mouse_widget_type,
- get_mouse_widget_first
+ get_mouse_widget_first,
+ get_mouse_flags
};
}
}
+static int get_kb_flags (int kb)
+{
+ return 0;
+}
+
struct inputdevice_functions inputdevicefunc_keyboard = {
init_kb, close_kb, acquire_kb, unacquire_kb, read_kb,
get_kb_num, get_kb_friendlyname, get_kb_uniquename,
get_kb_widget_num, get_kb_widget_type,
- get_kb_widget_first
+ get_kb_widget_first,
+ get_kb_flags
};
di_joystick[num].acquired = 0;
}
+static int get_joystick_flags (int num)
+{
+ return 0;
+}
+
struct inputdevice_functions inputdevicefunc_joystick = {
init_joystick, close_joystick, acquire_joystick, unacquire_joystick,
read_joystick, get_joystick_num, get_joystick_friendlyname, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_type,
- get_joystick_widget_first
+ get_joystick_widget_first,
+ get_joystick_flags
};
int dinput_wmkey (uae_u32 key)
uae_u64 totalphys64;
MEMORYSTATUS memstats;
- max_allowed_mman = 512;
+ max_allowed_mman = 768;
if (os_winnt) {
max_allowed_mman = 1536;
if (os_64bit)
max_allowed_mman = 2048;
}
- max_z3fastmem = (max_allowed_mman >> 1) * 1024 * 1024;
memstats.dwLength = sizeof(memstats);
GlobalMemoryStatus(&memstats);
}
}
}
-
- size64 = 16 * 1024 * 1024;
- while (total64 >= (size64 << 1)
- && size64 != ((uae_u64)2048) * 1024 * 1024)
- size64 <<= 1;
- if (size64 > max_allowed_mman * 1024 * 1024)
- size64 = max_allowed_mman * 1024 * 1024;
- if (size64 > 0x80000000)
- size64 = 0x80000000;
+ size64 = total64 - (total64 >> 3);
+ if (size64 > 0x7f000000)
+ size64 = 0x7f000000;
if (size64 < 8 * 1024 * 1024)
size64 = 8 * 1024 * 1024;
+ if (max_allowed_mman * 1024 * 1024 > size64)
+ max_allowed_mman = size64 / (1024 * 1024);
+ max_z3fastmem = (max_allowed_mman - (max_allowed_mman >> 3)) * 1024 * 1024;
write_log ("Max Z3FastRAM %dM. Total physical RAM %uM\n", max_z3fastmem >> 20, totalphys64 >> 20);
}
shmids[i].addr = NULL;
shmids[i].name[0] = 0;
}
+
for (;;) {
int change;
blah = VirtualAlloc(NULL, size + add, MEM_RESERVE, PAGE_EXECUTE_READWRITE);
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 1
+#define WINUAEBETA 2
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 12, 23)
+#define WINUAEDATE MAKEBD(2007, 12, 25)
#define WINUAEEXTRA ""
#define WINUAEREV ""
write_log ( "set_ddraw: Trying %dx%d, bits=%d, refreshrate=%d\n", width, height, bits, freq );
ddrval = DirectDraw_SetDisplayMode (width, height, bits, freq);
if (FAILED(ddrval)) {
- if (ddrval == E_NOTIMPL) {
- write_log ("set_ddraw: failed, trying without forced refresh rate\n");
- ddrval = DirectDraw_SetDisplayMode (width, height, bits, 0);
- if (FAILED(ddrval)) {
- write_log ( "set_ddraw: Couldn't SetDisplayMode()\n" );
- goto oops;
- }
+ write_log ("set_ddraw: failed, trying without forced refresh rate\n");
+ ddrval = DirectDraw_SetDisplayMode (width, height, bits, 0);
+ if (FAILED(ddrval)) {
+ write_log ( "set_ddraw: Couldn't SetDisplayMode()\n");
+ goto oops;
}
}
-
- ddrval = DirectDraw_GetDisplayMode();
+ ddrval = DirectDraw_GetDisplayMode ();
if (FAILED(ddrval)) {
write_log ( "set_ddraw: Couldn't GetDisplayMode()\n" );
goto oops;
}
if (dd) {
- ddrval = DirectDraw_CreateClipper();
+ ddrval = DirectDraw_CreateClipper ();
if (FAILED(ddrval)) {
- write_log ( "set_ddraw: No clipping support\n" );
+ write_log ("set_ddraw: No clipping support\n");
goto oops;
}
ddrval = DirectDraw_CreateSurface (width, height);
if (FAILED(ddrval)) {
- write_log ( "set_ddraw: Couldn't CreateSurface() for primary because %s.\n", DXError( ddrval ) );
+ write_log ("set_ddraw: Couldn't CreateSurface() for primary because %s.\n", DXError (ddrval));
goto oops;
}
if (DirectDraw_GetPrimaryBitCount() != (unsigned)bits && overlay) {
ddrval = DirectDraw_CreateOverlaySurface (width, height, bits, 0);
if(FAILED(ddrval))
{
- write_log ( "set_ddraw: Couldn't CreateOverlaySurface(%d,%d,%d) because %s.\n", width, height, bits, DXError( ddrval ) );
+ write_log ("set_ddraw: Couldn't CreateOverlaySurface(%d,%d,%d) because %s.\n", width, height, bits, DXError (ddrval));
goto oops2;
}
} else {
if (!DirectDraw_DetermineLocking (dxfullscreen))
{
- write_log ( "set_ddraw: Couldn't determine locking.\n" );
+ write_log ("set_ddraw: Couldn't determine locking.\n");
goto oops;
}
ddrval = DirectDraw_SetClipper (hAmigaWnd);
if (FAILED(ddrval)) {
- write_log ( "set_ddraw: Couldn't SetHWnd()\n" );
+ write_log ("set_ddraw: Couldn't SetHWnd()\n");
goto oops;
}
ddrval = DirectDraw_CreatePalette (currentmode->pal);
if (FAILED(ddrval))
{
- write_log ( "set_ddraw: Couldn't CreatePalette()\n" );
+ write_log ("set_ddraw: Couldn't CreatePalette()\n");
goto oops;
}
}
AVIOutput_Restart ();
#endif
setmouseactive (0);
- if (hMainWnd) {
- addnotifications (hMainWnd, TRUE);
- systray (hMainWnd, TRUE);
- }
if (hStatusWnd) {
ShowWindow (hStatusWnd, SW_HIDE);
DestroyWindow (hStatusWnd);
}
if (hAmigaWnd) {
+ addnotifications (hAmigaWnd, TRUE);
+ systray (hAmigaWnd, TRUE);
#ifdef OPENGL
OGL_free ();
#endif
struct PicassoResolution *pr = &DisplayModes[i];
if (pr->res.width == currentmode->native_width && pr->res.height == currentmode->native_height)
break;
- if (pr->res.width >= currentmode->native_width && pr->res.height >= currentmode->native_height) {
- write_log ("FS: %dx%d -> %dx%d\n", currentmode->native_width, currentmode->native_height,
- pr->res.width, pr->res.height);
- currentmode->native_width = pr->res.width;
- currentmode->native_height = pr->res.height;
- break;
+ }
+ if (DisplayModes[i].depth < 0) {
+ for (i = 0; DisplayModes[i].depth >= 0; i++) {
+ struct PicassoResolution *pr = &DisplayModes[i];
+ if (pr->res.width >= currentmode->native_width && pr->res.height >= currentmode->native_height) {
+ write_log ("FS: %dx%d -> %dx%d\n", currentmode->native_width, currentmode->native_height,
+ pr->res.width, pr->res.height);
+ currentmode->native_width = pr->res.width;
+ currentmode->native_height = pr->res.height;
+ break;
+ }
}
}
}
-
-
hAmigaWnd = CreateWindowEx (dxfs ? WS_EX_ACCEPTFILES | WS_EX_TOPMOST : WS_EX_ACCEPTFILES | exstyle | (currprefs.win32_alwaysontop ? WS_EX_TOPMOST : 0),
"AmigaPowah", "WinUAE",
WS_CLIPCHILDREN | WS_CLIPSIBLINGS | (hMainWnd ? WS_VISIBLE | WS_CHILD : WS_VISIBLE | WS_POPUP | WS_SYSMENU | WS_MINIMIZEBOX),
return 0;
}
- systray (hMainWnd, FALSE);
- addnotifications (hMainWnd, FALSE);
+ systray (hAmigaWnd, FALSE);
+ addnotifications (hAmigaWnd, FALSE);
if (hMainWnd != hAmigaWnd) {
ShowWindow (hMainWnd, SW_SHOWNORMAL);
UpdateWindow (hMainWnd);
SendDlgItemMessage (hDlg, id, CB_ADDSTRING, 0, (LPARAM)p1);
total++;
p1 = p2;
- } else break;
+ } else
+ break;
}
for (j = 0; j < inputdevice_get_device_total (IDTYPE_JOYSTICK); j++, total++)
SendDlgItemMessage (hDlg, id, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name(IDTYPE_JOYSTICK, j));
RelativePath="..\hq2x32.obj"
>
</File>
- <File
- RelativePath="..\resources\resource"
- >
- </File>
<File
RelativePath="..\resources\resource.h"
>
1.4.6 will be the last Windows 98/ME compatible version. 1.5.0
will require Windows 2000 or newer.
-Beta 1:
+Beta 2:
+
+- sprites outside bitplane area (AGA feature) was not working in all
+ bitplane/sprite resolution combinations (broke when shres was added)
+- relaxed Z3/RTG max RAM limits slightly (NOTE: it is 100% your
+ problem if you select too much RAM resulting in massive paging and
+ hd trashing)
+- systray icon was not always removed
+- fullscreen mode fallback fixes (145b18)
+- do not flush directory filesystem cache if ACTION_MORE_CACHE is
+ called with dp_Arg == 0, return current number of buffers only
+- ports-panel joystick/mouse friendly/guid name saved to config file,
+ no more changed selected devices if you save config, exit WinUAE,
+ insert or remove some input device(s) and then reload the config
+
+- joystick/mouse autoselection, input compatibility mode:
+ Press any unselected joystick's button 0 to "insert" it in
+ Amiga port 1 (joystick port) and button 1 to "insert" it in port 0
+ (mouse port). Same with any unselected mouse except left mouse
+ button = port 0 (mouse port) and right mouse button = port 1
+ (joystick port).
+
+- joystick/mouse autoselection, input configuration mode:
+ Differences compared to compatibility mode:
+ - because you can have mappings to multiple ports, device's first
+ port related mapping in input-panel is decided as the only port
+ number when doing remappings. When switching, only mappings that have
+ same port number are remapped to new port. Old mappings that already
+ have new port number will be remapped to old port number. Other
+ mappings are not changed.
+ - all other devices that are mapped to same port as new device will
+ be disabled
+ - only devices that are disabled (checkbox on right side of device
+ name is not ticked) are available for autoselection
+ - mouse switching is disabled if there are any "supermouse" mice
+ enabled (Windows mouse etc..) because it would cause total confusion.
+ Rawmouse or catweasel mouse are "safe".
+
+ Note: joystick button 0 has to select port 1 because for example
+ Amiga joysticks in PC adapter may only have one button and generally
+ you want joysticks in port 1.
+
+ Just insert any plug&play compatible joystick on the fly and press
+ first button. Can't get any easier!
+
+Beta 1:
- ESS Mega (CDTV) "hidden" data track now reads properly on W2K/XP
(uses SPTI READ_CD SCSI command if ReadFile() returns zero bytes.