diff --git a/gamefixes-steam/39510.py b/gamefixes-steam/39510.py deleted file mode 100755 index 0a20cee2..00000000 --- a/gamefixes-steam/39510.py +++ /dev/null @@ -1,37 +0,0 @@ -""" Game fix for Gothic II: Gold Edition -""" -#pylint: disable=C0103 - -import os -from protonfixes import util - - -def main(): - - screen_width,screen_height = util.get_resolution() - - zVidResFullscreenX=str(screen_width) - zVidResFullscreenY=str(screen_height) - - """ Modify Gothic.ini - """ - - game_opts = """ - [GAME] - scaleVideos=1 - [VIDEO] - zVidResFullscreenX=""" + zVidResFullscreenX + """ - zVidResFullscreenY=""" + zVidResFullscreenY + """ - zVidResFullscreenBPP=32 - """ - - # Localized versions use different casing for filenames - install_dir = util.get_game_install_path() - ini_path = os.path.join(install_dir,'System/Gothic.ini') - - util.set_ini_options(game_opts,ini_path,'cp1251','absolute') - - # Fix the game getting locked on exit - util.disable_fsync() - # GOG specific, Steam build doesn't have ddraw - util.winedll_override("ddraw", "n,b") diff --git a/gamefixes-steam/39510.py b/gamefixes-steam/39510.py new file mode 120000 index 00000000..b01108e1 --- /dev/null +++ b/gamefixes-steam/39510.py @@ -0,0 +1 @@ +65540.py \ No newline at end of file diff --git a/gamefixes-steam/65540.py b/gamefixes-steam/65540.py index 938013ea..b253fa2c 100755 --- a/gamefixes-steam/65540.py +++ b/gamefixes-steam/65540.py @@ -1,4 +1,5 @@ -""" Game fix for Gothic 1 +""" Game fix for Gothic 1 Classic + Game fix for Gothic II: Gold Classic """ #pylint: disable=C0103 @@ -6,14 +7,36 @@ def main(): + # Fix resolution, not necessary with 'GD3D11' - but doesn't hurt + set_resolution() - screen_width,screen_height = util.get_resolution() + # Fix background music / Gothic 2 startup + util.protontricks('directmusic') + util.winedll_override('*dsound', 'b') # Override registry entry - zVidResFullscreenX=str(screen_width) - zVidResFullscreenY=str(screen_height) + # Fix crackling audio + util.set_environment('PULSE_LATENCY_MSEC', '90') + + # Allow use of the popular workshop item 'GD3D11', which implements the DirectDraw API with Gothic-specific fixes + # Gothic 1: https://steamcommunity.com/sharedfiles/filedetails/?id=2791606767 + # Gothic 2: https://steamcommunity.com/sharedfiles/filedetails/?id=2787015529 + # + # This might also be necessary for the GOG release + util.winedll_override('ddraw', 'n,b') + + # Fix extreme mouse stutter and allow additional use of 'GRawInput (mouse fix)' from workshop + # Gothic 1: https://steamcommunity.com/sharedfiles/filedetails/?id=3054112346 + # Gothic 2: https://steamcommunity.com/sharedfiles/filedetails/?id=3054078559 + util.winedll_override('dinput', 'n,b') + util.winedll_override('dinput8', 'n,b') - """ Modify Gothic.ini - """ + +def set_resolution() -> None: + # Patch the config to match the system resolution + screen_width,screen_height = util.get_resolution() + + zVidResFullscreenX = str(screen_width) + zVidResFullscreenY = str(screen_height) game_opts = """ [GAME] @@ -24,7 +47,4 @@ def main(): zVidResFullscreenBPP=32 """ - util.set_ini_options(game_opts,'system/Gothic.ini','cp1251','game') - - # Fix the game getting locked on exit - util.disable_fsync() + util.set_ini_options(game_opts, 'system/Gothic.ini', 'cp1251', 'game')