示例#1
0
    def video_quit(self):
        """This function closes any open rendering window and shuts down the
        video system. The default SDL implementation of this function calls
        SDL_QuitSubSystem(SDL_INIT_VIDEO). This function should be called from
        within the RomClosed() video plugin function.
        PROTOTYPE:
         m64p_error VidExt_Quit(void)"""
        log.debug("Vidext: video_quit()")

        # Nullify those EGL variables
        if self.egl_context != egl.EGL_NO_CONTEXT:
            egl.eglDestroyContext(self.egl_display, self.egl_context)
            self.egl_context = egl.EGL_NO_CONTEXT

        egl.eglMakeCurrent(self.egl_display, egl.EGL_NO_SURFACE,
                           egl.EGL_NO_SURFACE, egl.EGL_NO_CONTEXT)
        if self.egl_surface != egl.EGL_NO_SURFACE:
            egl.eglDestroySurface(self.egl_display, self.egl_surface)
            self.egl_surface = egl.EGL_NO_SURFACE

        if self.egl_display != egl.EGL_NO_DISPLAY:
            egl.eglTerminate(self.egl_display)
            self.egl_display = egl.EGL_NO_DISPLAY

        self.new_surface = True

        ## GTK
        # Restore the good old name of the frontend
        if self.title != None:
            self.window.set_title(self.title)
        self.window.set_resizable(True)

        # First we must lift the restriction on the minimum size of the widget
        self.window.canvas.set_size_request(1, 1)

        #XXX: Workaround because GTK is too slow
        time.sleep(0.1)

        self.window.resize(self.former_size[0], self.former_size[1])
        return wrp_dt.m64p_error.M64ERR_SUCCESS.value
示例#2
0
 def release(self):
     egl.eglDestroySurface(self.egl_dpy, self.egl_surface)
示例#3
0
文件: generic.py 项目: eduble/panteda
 def release(self):
     egl.eglDestroySurface(self.egl_dpy, self.egl_surface)
示例#4
0
 def release(self):
     if self.gbm_surf is not None:
         libgbm.gbm_surface_destroy(self.gbm_surf)
     if self.egl_surface is not None:
         egl.eglDestroySurface(self.egl_dpy, self.egl_surface)