Hi,
I tried opening the file using the desktop version and while it opens fine, all I get is a pink surface blitted to the screen. I will see what I can do about sending the file. The code is pretty simple in that it is just the multistate application with the following changes.
- Code: Select all
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| HRESULT MainEventHandler::onInit(Surface* pBackBuffer, Panel* panel, Application* application) { //Save the pointer to the application, to acces shared components. this->application = (InitialApplication *) application;
frame = 0;
int nRet = video.open(TEXT("macreddin_sample_wmv.ogg")); if (nRet != ReturnCode::OK) { return ReturnCode::ERROR_OPENING_VIDEO; }
return ReturnCode::OK; }
HRESULT MainEventHandler::onNextFrame(Surface* pBackBuffer, Panel* mainPanel) { HRESULT hr = video.getNextFrame(&videosurface); switch(hr) { case ReturnCode::OK: // Blit the image to the screen pBackBuffer->bltFast(0, 0, &videosurface); frame++; break; case ReturnCode::END_OF_VIDEO: // Video is over break; default: break; }
return ReturnCode::OK; }
|
| 35 lines; 13 keywds; 3 nums; 84 ops; 1 strs; 3 coms Syntactic Coloring v0.4 - Dan East |
On another note, the xp build of the application has an extremely annoying behaviour where it minimizes the screen when it loses focus.