PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Zoom Width/Height?

I currently have a Smartphone game running on 176x220 resolution. Can I use dwDisplayZoomWidth/Height to stretch the game window and support 240x320 (hi-res) Smartphone devices? Has anyone tried this yet? Hi-res Smartphones are not yet available in our country so I couldn't try it. :(
Hi Erick. Unless it changed in the last update, dwDisplayZoom is only implemented on desktop machines.
Thanks GR! :)
It looks pretty easy, just blit your final Surface into the pBackbuffer. Something like that:

Code:

HRESULT CMyApplication::ProcessNextFrame(CGapiSurface * pBackbuffer, DWORD dwFlags)
{
MyWonderfulGame(m_gameSurface); // surface is a 176x220 surface

// Copy the game surface into the backbuffer, no matter the resolution
RECT rect_dest;
::SetRect(▭_dest, 0, 0, pBackbuffer->GetWidth(), pBackbuffer->GetHeight());
pBackbuffer->Blt(▭_dest, m_gameSurface, NULL, NULL, NULL);
}

Put a rect_src in the Blit is not necessary (NULL is for use the entire surface).