<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Как переопределить CreateDevice в полноэкранном режиме.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16677&amp;type=atom" />
	<updated>2021-10-25T13:23:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16677</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как переопределить CreateDevice в полноэкранном режиме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150201#p150201" />
			<content type="html"><![CDATA[<p>Когда приложение в полноэкранном режиме только одно устройство может быть привязано.<br />Переключайте в оконный режим, получайте EndScene, после чего переключайтесь в fullscreen.<br />Ну и совет, не мучьте автохотки, она для таких вещей не предназначена.<br />Учите c++ и читайте <a href="https://www.unknowncheats.me/forum/index.php">https://www.unknowncheats.me/forum/index.php</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-25T13:23:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150201#p150201</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как переопределить CreateDevice в полноэкранном режиме.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150197#p150197" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Direct3DCreate9(SDKVersion)
{
   if !DllCall(&quot;GetModuleHandle&quot;,&quot;str&quot;,(a_windir)&quot;\SysWOW64\d3d9&quot;, &quot;PTR&quot;)
   {
      MsgBox Error Direct3DCreate9
      Return
   }
   return DllCall((a_windir)&quot;\SysWOW64\d3d9\Direct3DCreate9&quot;, &quot;uint&quot;, SDKVersion)
}

IDirect3D9_CreateDevice(this,Adapter,DeviceType,hFocusWindow,BehaviorFlags,pPresentationParameters,ByRef ppReturnedDeviceInterface)
{
   hr := DllCall(NumGet(NumGet(this+0)+64),&quot;uint&quot;,this,&quot;uint&quot;,Adapter,&quot;uint&quot;,DeviceType,&quot;uint&quot;,hFocusWindow,&quot;uint&quot;,BehaviorFlags,&quot;uint&quot;,pPresentationParameters,&quot;uint*&quot;,ppReturnedDeviceInterface)
   if hr
      MsgBox Error IDirect3D9_CreateDevice
}

d3d := Direct3DCreate9(&quot;32&quot;) 
VarSetCapacity(D3DPRESENT_PARAMETERS, 48+2*A_PtrSize, 0) 
NumPut(1, D3DPRESENT_PARAMETERS, 0)
NumPut(1, D3DPRESENT_PARAMETERS, 4)
NumPut(1, D3DPRESENT_PARAMETERS, 24)
NumPut(1, D3DPRESENT_PARAMETERS, 24+2*A_PtrSize)
IDirect3D9_CreateDevice(d3d, 0, 1, 0, 0x00000040, &amp;D3DPRESENT_PARAMETERS, device)
EndScene := NumGet(NumGet(device+0)+42*A_PtrSize)</code></pre></div><br /><br /><p>Вы можете получить адрес EndScene в оконном режиме так же, как описано выше. Но я не могу получить адрес EndScene, потому что не могу использовать CreateDevice в полноэкранном режиме. Итак, я искал решение. Я слышал, что обходной путь - получить адрес EndScene с помощью уже определенного CreateDevice. Кто-нибудь знает, как это реализовать?</p>]]></content>
			<author>
				<name><![CDATA[nullmdn]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41945</uri>
			</author>
			<updated>2021-10-25T09:37:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150197#p150197</id>
		</entry>
</feed>
