Skip to content

Commit

Permalink
Stop using d2d.surface_size()
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenComfyTea committed Apr 12, 2023
1 parent 86485b4 commit 58983e4
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions reframework/autorun/Health_Bars/screen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,19 @@ function this.update_window_size()
local width;
local height;

if d2d ~= nil and config.current_config.settings.use_d2d_if_available then
local success, d2d_width, d2d_height = pcall(d2d.surface_size);
if success then
width = d2d_width;
height = d2d_height;
else
width, height = this.get_game_window_size();
end
else
width, height = this.get_game_window_size();
end
--if d2d ~= nil and config.current_config.settings.use_d2d_if_available then
-- local success, d2d_width, d2d_height = pcall(d2d.surface_size);
-- if success then
-- width = d2d_width;
-- height = d2d_height;
-- else
-- width, height = this.get_game_window_size();
-- end
--else
-- width, height = this.get_game_window_size();
--end

width, height = this.get_game_window_size();

if width ~= nil then
this.width = width;
Expand Down

0 comments on commit 58983e4

Please sign in to comment.