joystick axes can be reassigned; higher offset for axes moving detection; correction for menus that are bigger than screen
This commit is contained in:
parent
c1a3f3c13e
commit
ef1a1de34b
|
@ -1,5 +1,9 @@
|
|||
D2X-Rebirth Changelog
|
||||
|
||||
20070110
|
||||
--------
|
||||
main/kconfig.c, main/newmenu.c: joystick axes can be reassigned; higher offset for axes moving detection; correction for menus that are bigger than screen
|
||||
|
||||
20070109
|
||||
--------
|
||||
dxx-changelog.txt: added missing changelog entries
|
||||
|
|
|
@ -1693,24 +1693,23 @@ void kc_change_joyaxis( kc_item * item )
|
|||
|
||||
for (i=0; i<numaxis; i++ ) {
|
||||
#if defined (MACINTOSH)
|
||||
if ( abs(axis[i]-old_axis[i])>100 ) {
|
||||
#elif defined(WINDOWS)
|
||||
if ( abs(axis[i]-old_axis[i])>1024 ) {
|
||||
#else
|
||||
if ( abs(axis[i]-old_axis[i])>200 ) {
|
||||
if ( abs(axis[i]-old_axis[i])>100 )
|
||||
#else
|
||||
if ( abs(axis[i]-old_axis[i])>1024 )
|
||||
#endif
|
||||
{
|
||||
code = i;
|
||||
con_printf(CON_DEBUG, "Axis Movement detected: Axis %i\n", i);
|
||||
}
|
||||
//old_axis[i] = axis[i];
|
||||
}
|
||||
for (i=0; i<Num_items; i++ )
|
||||
{
|
||||
/* for (i=0; i<Num_items; i++ ) This only prevents us from defining an axis that is already mapped to another action
|
||||
{
|
||||
n = item - All_items;
|
||||
if ( (i!=n) && (All_items[i].type==BT_JOY_AXIS) && (All_items[i].value==code) )
|
||||
code = 255;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
if (code!=255) {
|
||||
for (i=0; i<Num_items; i++ ) {
|
||||
|
|
|
@ -928,8 +928,14 @@ int newmenu_do4( char * title, char * subtitle, int nitems, newmenu_item * item,
|
|||
w += (MenuHires?60:30)*MENSCALE_X;
|
||||
h += (MenuHires?60:30)*MENSCALE_Y;
|
||||
|
||||
if ( w > grd_curcanv->cv_bitmap.bm_w ) w = grd_curcanv->cv_bitmap.bm_w;
|
||||
if ( h > grd_curcanv->cv_bitmap.bm_h ) h = grd_curcanv->cv_bitmap.bm_h;
|
||||
// if ( w > grd_curcanv->cv_bitmap.bm_w ) w = grd_curcanv->cv_bitmap.bm_w;
|
||||
// if ( h > grd_curcanv->cv_bitmap.bm_h ) h = grd_curcanv->cv_bitmap.bm_h;
|
||||
/* If window is as or almost as big as screen define hard size so it fits (with borders and stuff).
|
||||
Also make use of MENSCALE_* so we are sure it does scale correct if font does scale or not */
|
||||
if (w >= (MenuHires?640:320)*MENSCALE_X-3)
|
||||
w=(MenuHires?638:318)*MENSCALE_X;
|
||||
if (h >= (MenuHires?480:200)*MENSCALE_Y-3)
|
||||
h=(MenuHires?478:198)*MENSCALE_Y;
|
||||
|
||||
x = (grd_curcanv->cv_bitmap.bm_w-w)/2;
|
||||
y = (grd_curcanv->cv_bitmap.bm_h-h)/2;
|
||||
|
|
Loading…
Reference in a new issue