mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 06:31:54 +00:00 
			
		
		
		
	[client] egl: refactor config dialog into main egl module
This will allow other things like scaling to be implemented.
This commit is contained in:
		@@ -52,9 +52,8 @@ struct EGL_Damage
 | 
			
		||||
  GLint uTransform;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void egl_damage_config_ui(void * opaque)
 | 
			
		||||
void egl_damage_config_ui(EGL_Damage * damage)
 | 
			
		||||
{
 | 
			
		||||
  EGL_Damage * damage = opaque;
 | 
			
		||||
  igCheckbox("Show damage overlay", &damage->show);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -90,7 +89,6 @@ bool egl_damage_init(EGL_Damage ** damage)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  (*damage)->uTransform = egl_shader_get_uniform_location((*damage)->shader, "transform");
 | 
			
		||||
  app_overlayConfigRegister("EGL", egl_damage_config_ui, *damage);
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -36,6 +36,7 @@ typedef struct EGL_Damage EGL_Damage;
 | 
			
		||||
bool egl_damage_init(EGL_Damage ** damage);
 | 
			
		||||
void egl_damage_free(EGL_Damage ** damage);
 | 
			
		||||
 | 
			
		||||
void egl_damage_config_ui(EGL_Damage * damage);
 | 
			
		||||
void egl_damage_setup(EGL_Damage * damage, int width, int height);
 | 
			
		||||
void egl_damage_resize(EGL_Damage * damage, float translateX, float translateY,
 | 
			
		||||
    float scaleX, float scaleY);
 | 
			
		||||
 
 | 
			
		||||
@@ -613,6 +613,12 @@ static void debugCallback(GLenum source, GLenum type, GLuint id,
 | 
			
		||||
  DEBUG_PRINT(level, "GL message (source: %s, type: %s): %s", sourceName, typeName, message);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void egl_config_ui(void * opaque)
 | 
			
		||||
{
 | 
			
		||||
  struct Inst * this = opaque;
 | 
			
		||||
  egl_damage_config_ui(this->damage);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool egl_render_startup(void * opaque, bool useDMA)
 | 
			
		||||
{
 | 
			
		||||
  struct Inst * this = (struct Inst *)opaque;
 | 
			
		||||
@@ -814,6 +820,8 @@ static bool egl_render_startup(void * opaque, bool useDMA)
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  app_overlayConfigRegister("EGL", egl_config_ui, this);
 | 
			
		||||
 | 
			
		||||
  this->imgui = true;
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user