Ticket #8585: diff

File diff, 1.2 KB (added by SF/knakos, 17 years ago)

patch at trunk/scummvm

  • common/system.h

     
    7373         */
    7474        virtual void initBackend() { }
    7575
     76        /**
     77         * Allows the backend to perform engine specific init.
     78         * Called just before the engine is run.
     79         */
     80        virtual void engineInit() { }
     81
     82        /**
     83         * Allows the backend to perform engine specific de-init.
     84         * Called after the engine finishes.
     85         */
     86        virtual void engineDone() { }
     87
    7688        /** @name Feature flags */
    7789        //@{
    7890
  • base/main.cpp

     
    215215        // As a last resort add current directory
    216216        Common::File::addDefaultDirectory(".");
    217217
     218        // Inform backend that the engine is about to be run
     219        system.engineInit();
     220
    218221        int result;
    219222
    220223        // Init the engine (this might change the screen parameters
     
    228231                result = engine->go();
    229232        }
    230233
     234        // Inform backend that the engine finished
     235        system.engineDone();
     236
    231237        // We clear all debug levels again even though the engine should do it
    232238        Common::clearAllSpecialDebugLevels();
    233239