mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	make result not optional
This fixes crash when hardware shader is enabled in the flatpak version
This commit is contained in:
		
							parent
							
								
									bf03fb83ae
								
							
						
					
					
						commit
						03c002ee2a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -254,7 +254,7 @@ public:
 | 
			
		|||
    explicit ShaderDoubleCache(bool separable) : separable(separable) {}
 | 
			
		||||
    std::tuple<GLuint, std::optional<ShaderDecompiler::ProgramResult>> Get(
 | 
			
		||||
        const KeyConfigType& key, const Pica::Shader::ShaderSetup& setup) {
 | 
			
		||||
        std::optional<ShaderDecompiler::ProgramResult> result{};
 | 
			
		||||
        ShaderDecompiler::ProgramResult result{};
 | 
			
		||||
        auto map_it = shader_map.find(key);
 | 
			
		||||
        if (map_it == shader_map.end()) {
 | 
			
		||||
            auto program_opt = CodeGenerator(setup, key, separable);
 | 
			
		||||
| 
						 | 
				
			
			@ -267,7 +267,7 @@ public:
 | 
			
		|||
            auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable});
 | 
			
		||||
            OGLShaderStage& cached_shader = iter->second;
 | 
			
		||||
            if (new_shader) {
 | 
			
		||||
                result->code = program;
 | 
			
		||||
                result.code = program;
 | 
			
		||||
                cached_shader.Create(program.c_str(), ShaderType);
 | 
			
		||||
            }
 | 
			
		||||
            shader_map[key] = &cached_shader;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue