|
Documentation
|
GapiDraw 3.6 Win32 Readme.txtThis document has been updated for use with GapiDraw 3.6 or later. |
ContentsPlease read the section known issues below before sending any bug reports.
Developing for high-resolution devices running Windows Mobile 2003 SEAs of version 3.5, GapiDraw now fully supports high-resolution VGA displays on Windows Mobile 2003 SE devices. A new display flag GDDISPLAY_HI_RES_AWARE was added to allow GapiDraw to use the full resolution, if the flag is not set GapiDraw will use standard QVGA 240x320 resolution on all Windows Mobile devices. Please remember to also add a resource called HI_RES_AWARE to your application project if you want to take advantage of these higher resolutions. If you do not add this resource, Windows Mobile 2003 SE will scale all stylus coordinates down to QVGA resolution! Also, the resource HI_RES_AWARE must be of type CEUX. This is how your .rc file should look: ///////////////////////////////////////////////////////////////////////////// All EVC 4.0 + Visual Studio 2005 sample projects shipped with GapiDraw 3.6 supports high-resolution displays under Windows Mobile 2003 SE and Windows Mobile 5.0.
Using "dirty rectangles" to update the displayQuestionIs it possible to copy an arbitrary part of the back-buffer to the frame-buffer on each Flip(), not the whole back-buffer? AnswerYes, but you have to modify CGapiApplication. Support for "dirty rectangles" will be added to the next major release of GapiDraw, but in the meantime here's how to do it in GapiDraw 3.01. Please note that the solution outlined below only works on Win32 systems. 1. First check to see if the display is double buffered. Call m_pDisplay->GetSurfaceFlags(&dwFlags). If (dwFlags & GDSURFACE_PRIMARY) is set, the display is not double buffered and it's possible to update the display using dirty rectangles (if it is double buffered, the blit to the display is done by the operating system - examples of such devices are Symbian Series 60 devices, older Casio Pocket PCs, and stationary PCs in full screen mode) . DWORD dwDisplayFlags;
Enabling mouse capture on stationary PCsQuestionOn the PC build, it is possible to press down a mouse button in the window and then move the mouse outside the window and release the mouse. So, the application does not receive a StylusUp event, and it's state is incorrect. How should I deal with this issue? Should I handle events for window exit and enter? Where should I be doing this in a GapiDraw application (that also runs in windowed mode on PC)? AnswerAdd the following code to your subclass of CGapiApplication: //---------------------------------------------------------------------- // Rest of code here // //---------------------------------------------------------------------- // Rest of code here //
Loading images relative to the executable file locationQuestionI have images stored in a folder "\mygame\data". When I start my application as "\mygame\myapplication.exe" and try to call CreateSurface(GDSURFACE_SYSTEMMEMORY, _T("data\\image.png")) the call fails and returns GDERR_BITMAPNOTFOUND! AnswerGapiDraw always uses the current folder location to search for images. If you start your application from Visual Studio, the current location can be something different from the folder where your application resides. To get the searchpath to your application you can use the following code and that way use absolute file paths with CreateSurface. DWORD getModuleDirectory(HMODULE hModule, TCHAR* szPath, DWORD dwLength) Call the above function using: TCHAR gameEXEPath[_MAX_PATH]; Append the filename of your bitmap to the application path using _tcscat(gameEXEPath, TEXT("imagefile"))).
Minimize on incoming phone callQuestionCan someone verify that in GapiDraw 2.02 upwards, when an incoming call happens on an O2 XDA, the gapiapplication will catch this event and minimise the app? if this is the case, it is not working for me - how do i go about forcing it to minimise? what happens in my app is that the gapiapp controls the focus causing it impossible to answer the call. AnswerIn GapiDraw 2.05 and earlier you had to use the configuration option "config.bMinimizeOnLostFocus" to minimize correctly in response to an incoming phone call. In GapiDraw 3.0 and later, this is done automatically. If you want to use the old behaviour however where GapiDraw always tries to recapture focus should it be lost, you can use the new configuration parameter config.bRegainLostFocus and set it to TRUE.
Using the "Home" button on Microsoft SmartphonesQuestionI tried capturing the "Home" button on a Microsoft Smartphone, but it does not work as expected. Two SmartPhones we tested on sporadically stopped responding to Home key totally, or stopped responding to the Home key after resuming the game after the Home key was hit once. AnswerIt is generally best to avoid using the home button in full-screen exclusive mode games on Microsoft Smartphones. If you want to use the home button, here are some tricks that might work. Open GapiApplication.cpp and scroll down to CGapiApplication::WindowProc. At the top of the function, type: #ifdef WIN32_PLATFORM_WFSP
if(msg == WM_KEYDOWN || msg == WM_KEYUP)
if(wParam == 0x5b) {
ShowWindow(hWnd, SW_HIDE);
return 0;
}
#endif
Under WM_ACTIVATE, type: if(!m_bActiveWindow) {
::ShowWindow(hWnd, SW_SHOW);
::SetForegroundWindow(hWnd);
::SetFocus(hWnd);
...
}
There is no guarantee that the above hack will work, but it has been reported from users to work in commercially available games.
Disabling the hardware button "click" sound on Microsoft SmartphonesQuestionI can't find out how to turn off the key clicks on my Smartphone. Is this something the user is supposed to do on the phone or (hopefully) something I can do from within the program code? AnswerThe following information is from Developing Smartphone Games, "Turn Off Hardware Button Click Sound": "You might have noticed that many games on Smartphones suffer from a "jagged" frame rate, but if you turn off the hardware button click sound, the games appear to run much smoother. For some reason, the device seems to freeze for a fraction of a second as the operating system plays the button click sound every time you push a button. Fortunately, almost every aspect of the user interface can be configured with XML. By setting up a small configuration script, you can tell the Configuration Manager to change almost anything you want. <wap-provisioningdoc> Use the DMProcessConfigXML() function to push the above XML configuration data through the Configuration Manager. Remember that you might lose focus during execution—so be sure to restore the original configuration before giving up control to another application. And since the user might have changed the settings while our application was inactive, read back to settings as we get focus back."
Known issuesNone
|