> From: Ralph Versteegen <[email protected]>
> Sent: Tuesday, November 09, 2010 4:52 AM
> 
> On 9 November 2010 07:25, Jay Tennant <[email protected]> wrote:
> > Are there any suggestions for gfx_directx? I know a few
> > things that semi-annoy me, and I'm sure must annoy others.
> > Maybe some features could be developed a little more?
> >
> > I'd like the sleep mode crash to be resolved. I'm
> > starting to research how to use the Window's system
> > message WM_POWERBROADCAST to determine when to release
> > directx resources, and then when to reallocate them upon
> > resuming.

I almost have this worked out. At least, it's not crashing anymore,
but I think it's impossible to fix fully (related to next bug).

To pseudo-fix the this bug, I think I'll just include a
"Backend Reset" button inside the options. It'll only reset
the d3d and d3ddevice objects.

> > I'd like the hotswapping-of-displays crashes to be
> > resolved.

This seems to be impossible to detect. I've searched all over
the docs and the internet, but I only found that Windows
does not send notifications about monitor connection state. It
seems to "know" about it, but will not raise an event for the
rest of the system.

http://social.msdn.microsoft.com/Forums/en/etw/thread/01373322-30ea-4abc-b7ca-0e698febe39d

Maybe by checking for connected monitors once every 3 seconds?

> > I'd like the "Refresh Joysticks" option to refresh
> > automatically upon plugging in or unplugging a joystick
> > device.

Haven't started, but I'll be using the WM_DEVICECHANGE
message to refresh the connected controllers.

> > The joysticks to have a configuration menu.

That'll be the last thing I do.

> > The settings to be saved between sessions, such as
> > setting screenshot format, resolution, joystick config,
> > checked settings, etc.
> 
> OK, OK, time to look into preference files.

Oh, I forgot about that. I was thinking of preferences saved
as a resource in the dll. But an outside file would be easily
configurable. I don't think all backends should access the 
same config file, though. Some resolutions for gfx_directx
won't work right in gfx_sdl, etc.

Because there aren't any major configurations, though, storing
as a resource might be a little cleaner. If one wants to start
the backend in "safe mode", perhaps an extra param could be sent
through the v2 interface gfx_Initialize (that is, whenever we
switch over...)

> > The io_setmouse() to move the mouse to the correct
> > screen location (it's off by a pixel, I think. You can
> > see it when in the tile editor, and pressing the
> > keyboard arrows in any direction. The mouse doesn't quite
> > reach the right interval.)

I'll attack this before other major changes.

> The only thing that annoys me (I haven't encountered any other
> problems) is that fast keypresses are lost. Switching to io_keybits is
> actually a pretty tiny amount of work. Do something like the
> following:
> 
> On keydown, change
> m_scancodes[ c_vk2fb[wParam] ] = 0x8;
> to
> m_scancodes[ c_vk2fb[wParam] ] = 0x7;
> 
> On keyup change
> m_scancodes[ c_vk2fb[wParam] ] = 0x0;
> to
> m_scancodes[ c_vk2fb[wParam] ] &= 0x6;
> 
> And during a call to io_keybits, do
> m_scancodes[i] &= 0x1;
> for each i.

I noticed that my xp box runs dramatically slower for this engine
than win 7. I now know what you mean by fast keypresses lost.
(I didn't really notice them until I sat down to test on xp. It
runs at about 2/3 the framerate! Still fully usable, but so much
slower.)

I'll get to this in a bit.

> Also, I notice that the +/= key doesn't work.

Ah, I fixed this. It was working, but I wrote it as a scancode
SC_PLUS. The win docs were a bit confusing:
http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx
"
VK_OEM_PLUS (0xBB)
Windows 2000/XP: For any country/region, the '+' key
"

That key was actually the '+ =' key for us keyboards.

I noticed the engine actually doesn't support the SC_PLUS and
SC_MULITPLY codes for text input. Can somebody fix this?

> Also, I'm going to deviate from FB's scancodes, adding scancodes for
> the missing keys (numpad / ?) gfx_fb won't support them, but all
> others can. I noticed that gfx_directx is the only backend which
> supports typing with the numpad! 

Oh. I've treated all numpad keys as extensions of the rest of the
keyboard, so they're just duplications of either the number keys or
arrow/navigation keys, depending on whether NumLock is pressed or not.
Windows does differentiate between the keys, so that'll be easy to fix.

When you designate those codes, we'll add support.



_______________________________________________________
Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
              http://www.doteasy.com 
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to