Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
K'van
Tales of MajEyal
Commits
80ea4f38
Commit
80ea4f38
authored
9 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Try to fix the gamma issue on some computers
parent
57983668
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/Game.lua
+10
-6
10 additions, 6 deletions
game/engines/default/engine/Game.lua
game/engines/default/engine/init.lua
+1
-1
1 addition, 1 deletion
game/engines/default/engine/init.lua
with
11 additions
and
7 deletions
game/engines/default/engine/Game.lua
+
10
−
6
View file @
80ea4f38
...
...
@@ -648,12 +648,16 @@ end
-- By default it uses SDL gamma settings, but it can also use a fullscreen shader if available
-- @param gamma
function
_M
:
setGamma
(
gamma
)
if
self
.
support_shader_gamma
and
self
.
full_fbo_shader
then
-- Tell the shader which gamma to use
self
.
full_fbo_shader
:
setUniform
(
"gamma"
,
gamma
)
-- Remove SDL gamma correction
core
.
display
.
setGamma
(
1
)
print
(
"[GAMMA] Setting gamma correction using fullscreen shader"
,
gamma
)
if
self
.
support_shader_gamma
and
core
.
shader
.
active
()
then
if
self
.
full_fbo_shader
then
-- Tell the shader which gamma to use
self
.
full_fbo_shader
:
setUniform
(
"gamma"
,
gamma
)
-- Remove SDL gamma correction
core
.
display
.
setGamma
(
1
)
print
(
"[GAMMA] Setting gamma correction using fullscreen shader"
,
gamma
)
else
print
(
"[GAMMA] Not setting gamma correction yet, no fullscreen shader found"
,
gamma
)
end
else
core
.
display
.
setGamma
(
gamma
)
print
(
"[GAMMA] Setting gamma correction using SDL"
,
gamma
)
...
...
This diff is collapsed.
Click to expand it.
game/engines/default/engine/init.lua
+
1
−
1
View file @
80ea4f38
...
...
@@ -143,7 +143,7 @@ game = false
-- Setup resolution
engine
.
Game
:
setResolution
(
config
.
settings
.
window
.
size
,
true
)
core
.
display
.
setTextBlended
(
config
.
settings
.
aa_text
)
core
.
display
.
setGamma
(
config
.
settings
.
gamma_correction
/
100
)
--
core.display.setGamma(config.settings.gamma_correction / 100)
if
not
config
.
settings
.
fbo_active
then
core
.
display
.
disableFBO
()
print
(
"Disabling FBO"
)
end
if
not
config
.
settings
.
shaders_active
then
core
.
shader
.
disable
()
print
(
"Disabling Shaders"
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment