Actually NOT sure why your Smart says "d3d9.dll not loaded" and yet it at the same time says: "d3d9.dll has no INIT method".. and it has an Init method:
Code:LIBRARY "d3d9.dll" BASE=0x0000000069640000 DESCRIPTION "D3D9 Definition File" EXPORTS D3DPERF_BeginEvent = DXHook_D3DPERF_BeginEvent @1 D3DPERF_EndEvent = DXHook_D3DPERF_EndEvent @2 D3DPERF_GetStatus = DXHook_D3DPERF_GetStatus @3 D3DPERF_QueryRepeatFrame = DXHook_D3DPERF_QueryRepeatFrame @4 D3DPERF_SetMarker = DXHook_D3DPERF_SetMarker @5 D3DPERF_SetOptions = DXHook_D3DPERF_SetOptions @6 D3DPERF_SetRegion = DXHook_D3DPERF_SetRegion @7 DebugSetLevel = DXHook_DebugSetLevel @8 DebugSetMute = DXHook_DebugSetMute @9 Direct3DCreate9 = DXHook_Direct3DCreate9 @10 Direct3DCreate9Ex = DXHook_Direct3DCreate9Ex @11 Direct3DShaderValidatorCreate9 = DXHook_Direct3DShaderValidatorCreate9 @12 PSGPError = DXHook_PSGPError @13 PSGPSampleTexture = DXHook_PSGPSampleTexture @14 SMARTPluginInit @15
C++ Code:bool SmartDebugEnabled = false;
bool SmartDirectXEnabled = true;
void SMARTButtonPressed(int ID, bool State)
{
switch(ID)
{
case 100:
if (State)
{
SmartGlobal->setCapture(false);
SmartDirectXEnabled = true;
}
else
{
SmartGlobal->setCapture(true);
SmartDirectXEnabled = false;
}
break;
case 101:
SmartDebugEnabled = State ? false : true;
break;
}
}
extern "C" void SMARTPluginInit(SMARTInfo* ptr, bool* ReplaceButtons, int* ButtonCount, char*** ButtonText, int** ButtonIDs, _SMARTButtonPressed* ButtonCallback)
{
SmartGlobal = ptr;
if (ptr)
{
*ReplaceButtons = true;
char** ButtonTexts = new char*[2];
ButtonTexts[0] = const_cast<char*>("Disable Direct-X_Enable Direct-X");
ButtonTexts[1] = const_cast<char*>("Enable Debug_Disable Debug");
int* IDs = new int[2];
IDs[0] = 100;
IDs[1] = 101;
*ButtonCount = 2;
*ButtonText = ButtonTexts;
*ButtonIDs = IDs;
*ButtonCallback = &SMARTButtonPressed;
}
}
Exact same code as in the OpenGL plugin.. It is practically impossible for the plugin NOT to be loading at all.. It exports everything Smart requires with the correct calling convention. In fact, if this plugin fails, so should OpenGL and that means SRL-6 is broken.. But yet that works :S I know I haven't made a mistake in the code; I just copy pasted my Smart headers from the OpenGL project into the DirectX project.
Another thing is that if the game fails to find an export, it will do: MessageBox(nullptr, e.what(), "ERROR!", 0); which will show which export failed to load.. I don't think you are getting any popups?
The only thing I can think of is something may be wrong on your end?
Last edited by Brandon; 01-21-2014 at 01:46 AM.
I am Ggzz..
Hackintosher
Try this:
Simba Code:{$loadlib libsmartremote}
var
params: TStringArray;
begin
params := explode(',', between('<iframe id="game" src="', '"', getPage('http://www.runescape.com/game.ws?j=1')));
if (not fileExists(PluginsPath+'d3d9.dll')) then
begin
writeln('NO PLUGIN!@!@@!@');
terminateScript();
end;
smartSpawnClient('C:/Program Files (x86)/Java/jre7/bin/java.exe', stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], 800, 600, '', '', '', 'd3d9.dll');
end.
I am Ggzz..
Hackintosher
Weird.. Nothing working? How odd. I ran it in a VM (Hyper-V) worked just fine. Ran it on my comp, it worked just fine as well..
If it failed, no matter what you should see a popup at least once. Try it on your actual comp? Can you get into DirectX normally without the plugin on your VM? Through the browser or through Smart?
I am Ggzz..
Hackintosher
Yeah I can get on DirectX without a problem on the vm, i'll edit this post. gonna try on comp.
But I think @Ashaman88; also ran it on his comp(he had the same flickering issue)
edit: same problem on my comp hmm, what could I be doing wrong?
Last edited by Sjoe; 01-21-2014 at 02:10 AM.
Creds to DannyRS for this wonderful sig!
Don't worry about the flickering.. It only flickers because you told Smart you'd be loading a plugin and Smart thinks you're lying since it isn't seeing any plugins.. Thus it begins to flicker because it isn't capturing any colours and you'll need to disable capturing to stop the flickering. It was designed this way on purpose and it comes in handy to let users know when it is working properly.
That is what the plugin does.. Well it's the job of the plugin to enable capture..
Try something else, place the d3d9.dll into C:/Program Files (x86)/Java/jre7/bin then run Smart regularly with no plugins.. Leave "DXI.dll" in C:/Simba/Plugins.. Switch Smart to DirectX mode. This should FORCE load the plugin from the jre7/bin automatically because it has no other choice but to load the first d3d9.dll found..
Your script should look like this (you should see a popup when Smart loads.. give it a roughly 25 seconds for good measure (in case your comp is slow?).. sometimes the popup is behind smart or on the task bar where "3" is written because it shows 3 smart tabs.. your smart screen should turn black after getting to the login screen! and it will only show colours when you close the popup.. This is a sign that the plugin was indeed loaded and working):
Last edited by Brandon; 01-21-2014 at 02:20 AM.
I am Ggzz..
Hackintosher
I'll try it out when I get home as well
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
It is flickering because you are still telling it to "look for d3d9.dll".. Copy the exact script in my post above (from the image above)..
Notice the "smartPlugins := []". You are doing it wrong because that screenshot you have here says "Native button 0:101 not found". That means you are still asking Smart to load the plugin instead of forcefully loading it via jre7/bin as described above.
I am Ggzz..
Hackintosher
I used this script to testand I did put the plugin in java bin (and removed it from c:\simba\plugins)Simba Code:program new;
{$DEFINE SMART}
{$I srl-6/srl.simba}
{$loadlib DXI}
begin
smartplugins := [];
SetupSRL;
if (dxisetup(__smartcurrentpid)) then
writeln('ok');
end.
edit:
Creds to DannyRS for this wonderful sig!
Hmm.. well that's just weird now. Your smart says "I am looking for a plugin's native button and not finding any" even though you're saying that you are not giving it any.. Something is wrong here.. Are you sure you are running "that script" and no other because your smart is saying otherwise and I really cannot figure out where you are going wrong? If you want I can teamviewer you and see why your Smart says that.. Up to you. But if you really are doing everything right, Smart shouldn't be lying like that. @Sjoe;
Last edited by Brandon; 01-21-2014 at 02:30 AM.
I am Ggzz..
Hackintosher
Solved it.. I finally solved it.. Had to make a custom library loader.
Before I start my long post, please note that you will not and should not try anything mentioned in this particular post as it is intended for me and it is only being posted so I don't forget how to solve it when I finish school tomorrow..
Here's the thing. Apparently, if you are trying to use Direct-X and your drivers did NOT install d3dx9_43.dll which ships with Microsoft 9.0c User-End Runtime (NOT developer!!), the plugin will try to load d3dx9_43.dll which is NOT on your system..
This means that no matter what, the plugin will not give an error for this because it simply isn't aware that your system is missing files required to run Direct-X (Especially since I compile with gcc and not MSVC which auto-includes these).. The only way is for me to actually make the plugin try to load this file first.. If it finds it, you're fine, if it doesn't, it will complain. Not sure if I want to do this.. It is however only 1-3 lines of code (just an if statement).
Anyway, I had to make a loader which was doing:
C++ Code:#include "Platforms.hpp"
#include <iostream>
int main()
{
if (xLoadLibrary("C:/Simba/Plugins/d3d9.dll"))
{
std::cout<<"d3d9.dll loaded just fine!!";
}
return 0;
}
This is what actually printed the error. It printed "d3dx9_43.dll is missing from your computer........". I was surprised Smart did NOT print this or give any other details other than "failed to load.".. Not only that but Smart actually loads plugins this exact way! Probably the Java side that try-catches it.. Not sure.
Anyway, for this reason, I will be bundling the plugin WITH d3dx9_43.dll for users who are missing files on their computer (which shouldn't be happening but just in case because I had enough of a hard time solving it today)..
Note: If it works for you, you don't need it.. otherwise you'll either need to fix your drivers OR if your drivers are fine, then you need to install direct-x 9.0c End-User runtime.. Otherwise you'll need it. It's much easier than installing anything..
Anyway, good night for now.. I'll see if I can upload the file tomorrow or something (or statically link to d3d9x if a static-lib exists). This is why we have beta testing and need more.. =)
Note: This post is just for knowledge so I don't forget st00f and so that next time I check here again I'll remember what I have to do.. Please do not install or try anything mentioned in this particular post! It is for me..
Last edited by Brandon; 01-21-2014 at 04:19 AM.
I am Ggzz..
Hackintosher
https://github.com/Brandon-T/DXI/releases/tag/v0.1
All bugs fixed so far.. Only thing left I guess is to Draw Smart's mouse and do the speed improvements for drawing..
I am Ggzz..
Hackintosher
flashing with latest plugin
http://puu.sh/6wTix.png
I'll follow the steps above this post next
Edit: updated drivers and still flashing
Edit2: Downloaded that direct-x 9.0c End-User runtime dealio
works now!
Last edited by Ashaman88; 01-24-2014 at 11:54 PM.
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Can't seem to get it to work with anything... The actual Plugin is working and is loading RS in Direct X, but scripts will not do anything. What have I overlooked?
Unfortunately I cannot use OpenGL at all. The lag is ridiculous when I am using SMART, so this is my only option.
Maybe something is different with the login screens from ogl/direct-x. il look into it.
I have a 10hr proggy going using the directx plugin.. so you guys are cray
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
There are currently 1 users browsing this thread. (0 members and 1 guests)