iidxhook: allow forcing adapter and refresh rate in d3d9 based IIDX games - [merged] #122

Closed
opened 2020-01-10 18:45:29 +03:00 by icex2 · 21 comments
icex2 commented 2020-01-10 18:45:29 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 16:45

Merges iidxhook-d3d9-adapter-force -> master

This allows the user to select a different monitor to render the game on.
This also allows users to change what refresh rate the d3d device is opened with.

In GitLab by @xyen on Jan 10, 2020, 16:45 _Merges iidxhook-d3d9-adapter-force -> master_ This allows the user to select a different monitor to render the game on. This also allows users to change what refresh rate the d3d device is opened with.
icex2 commented 2020-01-11 01:03:46 +03:00 (Migrated from github.com)

The define gets rather long, but I suggest expanding the "RR" to "RefreshRate".

The define gets rather long, but I suggest expanding the "RR" to "RefreshRate".
icex2 commented 2020-01-11 01:03:50 +03:00 (Migrated from github.com)

The define gets rather long, but I suggest expanding the "RR" to "RefreshRate".

The define gets rather long, but I suggest expanding the "RR" to "RefreshRate".
icex2 commented 2020-01-11 01:05:09 +03:00 (Migrated from github.com)

What's the line width here compared to below? Did you use clang-format to enfore the code style?

What's the line width here compared to below? Did you use clang-format to enfore the code style?
icex2 commented 2020-01-11 01:05:16 +03:00 (Migrated from github.com)

What's the line width here compared to above? Did you use clang-format to enfore the code style?

What's the line width here compared to above? Did you use clang-format to enfore the code style?
icex2 commented 2020-01-11 01:05:56 +03:00 (Migrated from github.com)

Is this ever going to be negative?

Is this ever going to be negative?
icex2 commented 2020-01-11 01:06:06 +03:00 (Migrated from github.com)

Same here, negative values?

Same here, negative values?
icex2 commented 2020-01-11 01:08:36 +03:00 (Migrated from github.com)

Is there a way to get to know which adapters are selectable?

Is there a way to get to know which adapters are selectable?
icex2 commented 2020-01-11 01:27:39 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:27

Commented on src/main/iidxhook-util/d3d9.c line 277

We could call GetAdapterCount, but I'd like to avoid calling any d3d functions inside of this code.

With the other change of making the error message actually log correctly, it'll state Creating D3D9 device failed along with a reason, and so you can tell if it's because of an invalid adapter.

In GitLab by @xyen on Jan 10, 2020, 23:27 Commented on [src/main/iidxhook-util/d3d9.c line 277](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..c3d7b95c59a6b012e8be0e73f44eef8798d48efb#diff-110d0927d2bc80120b260ee2af7ad40aR277) We could call GetAdapterCount, but I'd like to avoid calling any d3d functions inside of this code. With the other change of making the error message actually log correctly, it'll state `Creating D3D9 device failed` along with a reason, and so you can tell if it's because of an invalid adapter.
icex2 commented 2020-01-11 01:29:00 +03:00 (Migrated from github.com)

Ok, sounds reasonable. Then let's leave the code like that for now.

Ok, sounds reasonable. Then let's leave the code like that for now.
icex2 commented 2020-01-11 01:35:47 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:35

Commented on src/main/iidxhook-util/config-gfx.h line 22

Yes, I've specified the default value to be -1

In GitLab by @xyen on Jan 10, 2020, 23:35 Commented on [src/main/iidxhook-util/config-gfx.h line 22](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..ec852f2c92a2693b2c9ae6805b4a7709630fe26f#diff-7dd862ffc0fa36da2ca65dc1e5bb08b6R22) Yes, I've specified the default value to be -1
icex2 commented 2020-01-11 01:35:49 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:35

Commented on src/main/iidxhook-util/config-gfx.h line 23

Yes, I've specified the default value to be -1

In GitLab by @xyen on Jan 10, 2020, 23:35 Commented on [src/main/iidxhook-util/config-gfx.h line 23](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..ec852f2c92a2693b2c9ae6805b4a7709630fe26f#diff-7dd862ffc0fa36da2ca65dc1e5bb08b6R23) Yes, I've specified the default value to be -1
icex2 commented 2020-01-11 01:36:52 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:36

Commented on src/main/iidxhook-util/config-gfx.c line 23

changed this line in version 2 of the diff

In GitLab by @xyen on Jan 10, 2020, 23:36 Commented on [src/main/iidxhook-util/config-gfx.c line 23](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..c3d7b95c59a6b012e8be0e73f44eef8798d48efb#diff-4757bc24acd44e26f1dd2787319a04e3R23) changed this line in [version 2 of the diff](/djhackers/bemanitools/merge_requests/21/diffs?diff_id=1127&start_sha=c3d7b95c59a6b012e8be0e73f44eef8798d48efb#d043545bcefeff129c3addd1e7498ee982e076b7_23_23)
icex2 commented 2020-01-11 01:36:53 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:36

Commented on src/main/iidxhook-util/config-gfx.c line 153

changed this line in version 2 of the diff

In GitLab by @xyen on Jan 10, 2020, 23:36 Commented on [src/main/iidxhook-util/config-gfx.c line 153](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..c3d7b95c59a6b012e8be0e73f44eef8798d48efb#diff-4757bc24acd44e26f1dd2787319a04e3R153) changed this line in [version 2 of the diff](/djhackers/bemanitools/merge_requests/21/diffs?diff_id=1127&start_sha=c3d7b95c59a6b012e8be0e73f44eef8798d48efb#d043545bcefeff129c3addd1e7498ee982e076b7_153_153)
icex2 commented 2020-01-11 01:36:53 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:36

Commented on src/main/iidxhook-util/d3d9.c line 277

changed this line in version 2 of the diff

In GitLab by @xyen on Jan 10, 2020, 23:36 Commented on [src/main/iidxhook-util/d3d9.c line 277](https://github.com/djhackersdev/bemanitools/compare/c24376b99cf056951becd25b160a3f1087c72cee..c3d7b95c59a6b012e8be0e73f44eef8798d48efb#diff-110d0927d2bc80120b260ee2af7ad40aR277) changed this line in [version 2 of the diff](/djhackers/bemanitools/merge_requests/21/diffs?diff_id=1127&start_sha=c3d7b95c59a6b012e8be0e73f44eef8798d48efb#d015258660c251c632485a50c774348331d25cf9_277_281)
icex2 commented 2020-01-11 01:36:54 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:36

added 2 commits

  • 4c805d3d - clang-format pass
  • ec852f2c - iidxhook/d3d9exhook: Use -1 to specify default adapter instead of 0 because...

Compare with previous version

In GitLab by @xyen on Jan 10, 2020, 23:36 added 2 commits <ul><li>4c805d3d - clang-format pass</li><li>ec852f2c - iidxhook/d3d9exhook: Use -1 to specify default adapter instead of 0 because...</li></ul> [Compare with previous version](/djhackers/bemanitools/merge_requests/21/diffs?diff_id=1127&start_sha=c3d7b95c59a6b012e8be0e73f44eef8798d48efb)
icex2 commented 2020-01-11 01:37:06 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 10, 2020, 23:37

resolved all threads

In GitLab by @xyen on Jan 10, 2020, 23:37 resolved all threads
icex2 commented 2020-01-11 01:38:19 +03:00 (Migrated from github.com)

You're right, let me re-phrase my question: Why are you checking > 0 if 0 doesn't seem to be a valid/reasonable value to set? I would suggest using 0 as the default to disable this feature instead of -1.

You're right, let me re-phrase my question: Why are you checking > 0 if 0 doesn't seem to be a valid/reasonable value to set? I would suggest using 0 as the default to disable this feature instead of -1.
icex2 commented 2020-01-11 01:42:52 +03:00 (Migrated from github.com)

On discord: Keep disable values consistent with -1 sounds reasonable. Resolved.

On discord: Keep disable values consistent with -1 sounds reasonable. Resolved.
icex2 commented 2020-01-11 01:42:53 +03:00 (Migrated from github.com)

resolved all threads

resolved all threads
icex2 commented 2020-01-11 01:43:13 +03:00 (Migrated from github.com)

Ok, lgtm then. Feel free to merge.

Ok, lgtm then. Feel free to merge.
icex2 commented 2020-01-11 02:45:41 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jan 11, 2020, 24:45

merged

In GitLab by @xyen on Jan 11, 2020, 24:45 merged
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Max/djhackersdev_bemanitools#122