Next Generation Emulation banner

1 - 20 of 55 Posts

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #1
Ok, when playing cxbx for prolonged periods of time on a joystik, the screen saver (for those who use it) will pop up. "So what's wrong with that?" I'll tell you. After closing the screen saver, the Direct3D Device is either totally lost, or needs to be reset so we can continue to have graphics. This is a VERY easy and simple thing to fix and I'm supprised that it was not implemented before. Here's the source just in case some one doesn't know what I'm talking about and those who don't think I can code. There might be more to it, but if there is I forgot. I'll fix it when I get a chance.
Code:
HRESULT Direct3DDeviceValidation()
{
     HRESULT r=lpD3DDevice->TestCooperativeLevel();// test cooperative level and see what's wrong 
     if(r==DEVICE_LOST) return E_FAIL; //If it's gone for good, bail out
     if(r==DEVICE_NOTRESET)// if it's not reset, try
     {
          do
          {
                 r=lpD3DDevice->Reset(Direct3DPresentParameters);
          }(while FAILED(r))// Keep trying until we get a valid device
     }
     return S_OK;// we did it :)
}
I would implement it myself, but I don't know exactly where to put it in this emu because I still haven't quite found a suitable place yet. Thanks for reading.
 

·
Premium Member
Joined
·
907 Posts
this is some realy good info bleushogun :) keep up the good work.
for know yust disable screensaver when playing games is the only option.. prehaps we need to build a faq list or something..
 

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #3
Thanks shadow_tj, I'm beginning to wonder if you are the only one besides proger and caustik who actually appreciates me. Everyone else acts as if they don't care :(
 

·
Administrator
Joined
·
8,200 Posts
blueshogun96 said:
Thanks shadow_tj, I'm beginning to wonder if you are the only one besides proger and caustik who actually appreciates me. Everyone else acts as if they don't care :(
well most people here dont know anything about programming so its something that you should expect...

if your helping out, then we all appreciate what you are doing :thumb:
 

·
Premium Member
Joined
·
907 Posts
most of the people reading this stuff are only intrested in playing there games on cxbx not on programming or make cxbx a better emu.

Does annyone have some news about caustik.. haven`t seen him around here for long time :(
 

·
Leading the way.
Joined
·
836 Posts
He's been a busy guy it seems like. I've e-mailed him a few times and it seems like he really wishes cxbx could progress, but he no longer has any time and can't find anyone qualified or interested to take over or help.
 

·
Registered
Joined
·
608 Posts
I know a bit about programming, but I have no idea what you wrote ;)
Your work is certainly appreciated! Keep it up!
 

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #8
well most people here dont know anything about programming so its something that you should expect...
Yeah, that's true.
most of the people reading this stuff are only intrested in playing there games on cxbx not on programming or make cxbx a better emu.
Unrgateful kids :rant: , forgot about that. Just because they have no busy life doesn't mean caustik doesn't :mad:
but he no longer has any time and can't find anyone qualified or interested to take over or help.
www.angelfire.com/games5/avpx/ellite.JPG
Your work is certainly appreciated! Keep it up!
Thankee :thumb:
 

·
Premium Member
Joined
·
907 Posts
the sources are open so why not all start to pick it up.
i have looked a lott on the sources but unfortanily i`m a delphi programmer and doen`t have much basic knowladge of c++

i have tried to port the cxbx sources to delphi.
but also that is a hard coding :)
but we still try everyday

Caustik, you are a good programmer and you have my full respect.. hope you have some free time in the futher.
 

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #10
i have tried to port the cxbx sources to delphi.
Good luck my friend :)
Caustik, you are a good programmer and you have my full respect.. hope you have some free time in the futher.
x2
 

·
Premium Member
Joined
·
907 Posts
have you aleary found the place to get your screensaver fix into ???

otherwise i will try it :)
you can also place patches for cxbx on the sourceforge website.. :)
just found out this morning.. so yust place patches for the sources and we can make cxbx be a better emu
 

·
Registered
Joined
·
350 Posts
People who think cxbx is dead.
Think about this
4/07/04
Turok runs GREAT.
12/8/03
Quick update about progress.
---
See, caustik dosent update for months, then something BIG happens.
 

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #14
shadow_tj said:
have you aleary found the place to get your screensaver fix into ???

otherwise i will try it :)
you can also place patches for cxbx on the sourceforge website.. :)
just found out this morning.. so yust place patches for the sources and we can make cxbx be a better emu
I have forgot to check again because I have some other projects going on now, but I did make a small mistake in that code snippit, I don't remember what it was, but I'll fix it soon and add it to the latest Cxbx src. Thanks for showing interest in this you guys :)
 

·
<font color="#990000"><b>Lurking</b></font>
Joined
·
9,358 Posts
Um, isnt cooperativelevel() initialised and validated after D3D objects are initialsed? I havent looked at the sources but from my understanding, that's part of the general DX init format.

Yours,
-Elly
 

·
Premium Member
Joined
·
6,071 Posts
Discussion Starter #17
エッリー said:
Um, isnt cooperativelevel() initialised and validated after D3D objects are initialsed? I havent looked at the sources but from my understanding, that's part of the general DX init format.

Yours,
-Elly
Yes ma'am. :)
 

·
Registered
Joined
·
2 Posts
"those who don't think I can code" blueshogun96, copy'n'pasting the source, which reinitilizes the d3d device,
from the msdn has nothing to do with programming.
Actually you don't even know where to place the code, a programmer does not need to fish for compliments like you do
"I'm beginning to wonder if you are the only one besides proger and caustik who actually appreciates me" ...
this is really childish.

By the way "(while FAILED(r))" would be a sweet endless loop, are you sure that you don't want something like this:

Code:
static void validate_device(const Direct3DDevice9 & device, const D3DPRESENT_PARAMETERS & parameters)
{
   HRESULT hr = device.TestCooperativeLevel();
   if((hr == D3DERR_DEVICELOST) || 
     ((hr == D3DERR_DEVICENOTRESET) 
     && FAILED(device.Reset(&parameters))))
   { throw std::exception(...); }
}
This forum full of crying kids must be a real pain for caustik...
 

·
Registered
Joined
·
9 Posts
meta said:
Just kidding, keep up the good work blueshogun96 and you others, don't stop crying :rotflmao:
I love you for that message. Keeps me up, reading this forum. And of course I'm kidding as well. :thumb:
 
1 - 20 of 55 Posts
Top