示例#1
0
 Class<?> getPluginClass(String packageName, String className)
     throws NameNotFoundException, ClassNotFoundException {
   Context pluginContext =
       this.mAppContext.createPackageContext(
           packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
   ClassLoader pluginCL = pluginContext.getClassLoader();
   return pluginCL.loadClass(className);
 }
示例#2
0
  public void update() {
    nUpdate();

    if (!isFocused && parent != null && parent_focused.compareAndSet(true, false)) {
      setFocus(getHwnd());
    }

    if (redoMakeContextCurrent) {
      redoMakeContextCurrent = false;
      /**
       * WORKAROUND: Making the context current (redundantly) when the window is maximized helps
       * some gfx cards recover from fullscreen
       */
      try {
        Context context = ((DrawableLWJGL) Display.getDrawable()).getContext();
        if (context != null && context.isCurrent()) context.makeCurrent();
      } catch (LWJGLException e) {
        LWJGLUtil.log("Exception occurred while trying to make context current: " + e);
      }
    }
  }