diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-22 12:22:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-22 12:22:36 +0300 |
commit | b65a983d391edf4c2ee2fcf9c80f4ff074bc6b59 (patch) | |
tree | 13baa5499d54db3c92e1a6a709f8928f3920def2 /source/gameengine/BlenderRoutines | |
parent | 756dace6f53ae2c11cb40a0f09b58d2de1ed8413 (diff) |
use BLI_findstring in more places & remove some warnings, no functional changes.
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r-- | source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 8a2aea4567e..d06fc283613 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -316,22 +316,8 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c exitrequested = KX_EXIT_REQUEST_QUIT_GAME; } } - - Scene *blscene = NULL; - if (!bfd) - { - blscene = (Scene*) blenderdata->scene.first; - for (Scene *sce= (Scene*) blenderdata->scene.first; sce; sce= (Scene*) sce->id.next) - { - if (startscenename == (sce->id.name+2)) - { - blscene = sce; - break; - } - } - } else { - blscene = bfd->curscene; - } + + Scene *blscene= bfd ? bfd->curscene : (Scene *)BLI_findstring(&blenderdata->scene, startscenename, offsetof(ID, name) + 2); if (blscene) { @@ -457,7 +443,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c * should this really be? */ if (event->type==MOUSEMOVE) { - /* Note nice! XXX 2.5 event hack */ + /* Note, not nice! XXX 2.5 event hack */ val = event->x - ar->winrct.xmin; mousedevice->ConvertBlenderEvent(MOUSEX, val); |