[rs-devel] Re: [ retrostep-Bugs-553027 ] LSAPI LCOpen(NULL) doesn't open step.rc
Status: Beta
Brought to you by:
obada
From: Pavel V. <pv...@se...> - 2002-05-06 22:22:50
|
>>Comment By: Mudiaga Obada (obada) > Date: 2002-05-06 23:31 > Message: > Logged In: YES > user_id=223361 > In retro, $LitestepDir$ is userdefinable, and sometimes > auto-detected in parent directory. If there is no step.rc in > $ls.dir$. > Look at the Retrostep log. It tells you where it expects to > find step.rc. I have set in step.rc: LitestepDir c:\litestep\ The problem is, from my point of view, that lot of modules uses LCOpen(NULL) to load the step.rc for processing with LCReadNextConfig, etc. It worked for me in LS and pLS, so it seems like classical compatibility problem. I used steprc parameter that's passed into initModuleEx for opening step.rc, which worked well in most cases: FILE *f = LCOpen(steprc); , but in some older builds of LS or pLS (honestly i don't remember that exactly) this didn't worked. So I found that easiest and most compatible way for module is to use LCOpen(NULL). Since it doesn't work in Retro 0.0.5.10 as I learned in couple of my modules, I had to go through and change it to: FILE *f = LCOpen(steprc); if (!f) f = LCOpen(NULL); Now it works in Retro and in LS, pLS too. Conclusion: I mean that if step.rc file has been found successfuly by retro(litestep)-core in the beginning, it should be able to open it again by calling LCOpen(NULL) in the code. pavel --- Pavel Vitis mailto:pav...@se... http://come.to/lsg/ |