Jump to content


Photo

Sin Desktop Dll


  • Please log in to reply
46 replies to this topic

#1 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 19 January 2009 - 11:17 PM

Not supported anymore, please use a more cross-platform extension instead.


Edited by Sindarin, 24 February 2012 - 09:39 AM.

  • 0
GM 8.1 / GM:HTML5 User

#2 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 20 January 2009 - 01:31 AM

I had made this dll in Delphi but I remade it in C++, so the result is a faster, lighter, more stable DLL.

Why did you need to, the only thing that would have changed would be the size. (Not too much as this contains no UI)

Personally I hate it when the resolution change changes my window sizes, I like them the way they are :D What's up with the "Sin" in the name? :whistle:
  • 0

#3 epicCreations

epicCreations

    Cool As Ace

  • New Member
  • 1241 posts
  • Version:Unknown

Posted 20 January 2009 - 04:15 AM

Cuz his name! :D I might find a use for this at one point, but right now there doesn't seem to be any uses I can think of... BTW, can it tell whether or not the certain combination is allowed by the graphics card? Crap, didn't read all the features. :whistle:

Edited by GT G33K T3RR1T0RY, 20 January 2009 - 04:16 AM.

  • 0

#4 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 20 January 2009 - 09:22 AM

Why did you need to, the only thing that would have changed would be the size. (Not too much as this contains no UI)


Actually my last display dll was a delphi wrapper for a c++ dll mostly because I did not know how to use doubles with C++ and Game Maker to make one. I also can't really blame Game Maker, I'll blame Delphi as I tried to make a dll that changed display settings but the result was exactly the same as Game Maker's function. Icons and windows messed up, so maybe that's a bug of Delphi after all.

What's up with the "Sin" in the name?


Well it's a way to differentiate my dll, maybe to give it a "branding". Originates from my username, that's right. :blink: I'll be putting the Sin prefix in every new dll I might release.

Edited by Sindarin, 20 January 2009 - 09:23 AM.

  • 0
GM 8.1 / GM:HTML5 User

#5 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 20 January 2009 - 11:11 PM

Delphi and C++ both compile to the same thing, but you may have used a different function of some sort that was defined by Delphi.

Just like 39dll is named after 39ster.
  • 0

#6 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 21 January 2009 - 09:27 AM

I know, it's really odd, I used the exact same method, could be the compiler, I don't know.

Just like 39dll is named after 39ster.


Kinda yeah.
  • 0
GM 8.1 / GM:HTML5 User

#7 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 21 January 2009 - 10:04 AM

I used the exact same method, could be the compiler

The Delphi units seem to have their own function if they can, if nit they do it the real way (that's done in C++). So they use less WinAPI.

Edited by GMREC1111, 21 January 2009 - 10:05 AM.

  • 0

#8 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 31 January 2009 - 01:03 PM

Not supported anymore, please use an extension instead.


Edited by Sindarin, 24 February 2012 - 09:37 AM.

  • 0
GM 8.1 / GM:HTML5 User

#9 Jax

Jax

    GMC Member

  • New Member
  • 232 posts

Posted 31 January 2009 - 05:06 PM

Cool dll! I didn't know it cleared the surfaces... :GM123: I like to store sprites in surfaces for easy loading and unloading, this could be useful to me! :)
Oh my gosh! I made a simple thing that draws onto a surface in the create, then draws it in the draw. When I locked the screen and come back, it said that it was trying to draw non-existing surface! :)
-Thanks Sindarin for introducing me to some knowledge, and a good dll!
-Rock on! :GM123:

~Jax
  • 0

#10 MrOpposite

MrOpposite

    Yesterdays games

  • New Member
  • 744 posts

Posted 31 January 2009 - 05:49 PM

I dont get it... "Lock Screen"? how could you lock a screen? :S (I am not being rude, I'm trying to get some knowledge to!)
  • 0
I'm working on a new project. The project name is "Timeline"

Reinventing the wheel is stupid, but stealing a car is illegal.

#11 ditdingiscool

ditdingiscool

    GMC Member

  • New Member
  • 335 posts

Posted 31 January 2009 - 06:03 PM

I dont get it... "Lock Screen"? how could you lock a screen? :S (I am not being rude, I'm trying to get some knowledge to!)

it's a function in windows, try to press [windows-key]+[L]
in some setups this only results in going to the logon screen(without logging you out!) in some setups it means only you can 'unlock' the pc
  • 0

#12 MrOpposite

MrOpposite

    Yesterdays games

  • New Member
  • 744 posts

Posted 31 January 2009 - 07:41 PM

Ahh, that... Im using the swedish version of windows XP, and that function is called "växla användare" (or translated, "Switch User") thats why i didt get it :GM123: and then this DLL sounds ALOT more usefull than it did before :GM123: (Now, i just have to learn to use surfaces first)
  • 0
I'm working on a new project. The project name is "Timeline"

Reinventing the wheel is stupid, but stealing a car is illegal.

#13 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 31 January 2009 - 08:34 PM

StarTrek: To switch user, you have to lock the screen first (ie to get to the user selection screen, also known as Logon screen).
By the way, "switch user" is also on english version. You won't see "lock screen" written anywhere.

Regards,
Christian V. Sciberras
  • 0

#14 alex_pof

alex_pof

    GMC Member

  • New Member
  • 1296 posts

Posted 01 February 2009 - 08:29 PM

Your demo works but when i try and add it into my game i get an unexpected error. Also, what kind of problems do you see when using the GM resolution changing because your example looks the same as if i was to use the built in functions.
  • 0

#15 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 03 February 2009 - 01:39 AM

Try initializing the dll at the first room and after a while call the function to change the resolution.
For some people, including me, Game Maker games have been reported to mess up the desktop icons and currently open windows when the resolution is set back to normal at game end.
  • 0
GM 8.1 / GM:HTML5 User

#16 TheMyst

TheMyst

    GMC Member

  • New Member
  • 166 posts

Posted 02 April 2009 - 08:37 PM

oooOOOOOOOOOOOOOOHhhhh! I'll have to take a look at this bad boy.
  • 0
Level Editor Example: Use/Abuse as you wish.
My PC (recently upgraded): Asus P5Q SE2 Mainboard, Core 2 Quad @ 2.33 (will overclock), 4GB OCZ RAM, Onboard Sound by VIA Technologies, nVIDIA BFG 9800GTX.
My old stuff is going on Craigslist: EVGA 650i Ultra Mainboard, 2GB Ram, 2.33 Core 2 Duo (OC'd to 3.0), nVIDIA 8600 GT.
Copy and paste this into your signature if you DON'T GIVE A #$@% about religion, but nonetheless are annoyed by people who wear it like a badge.

#17 prog

prog

    GMC Member

  • New Member
  • 1121 posts

Posted 07 May 2009 - 12:13 AM

Do you mind if I add this to a gex file (extension) I've been working on? I'll give you credit if you do.
  • 0
Progames

NEW WEBSITE!
I have a large collection of music on my website. If you need some, take a look.
If you need a script, PM me. I'll make you one for free.

#18 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 07 May 2009 - 01:24 AM

Can you detect if the application looses focus and restore the resolution to the desktop when it does? And back to the specified resolution when it comes back? Your set function would have to store the values in the dll global variables...


Or provide a function that tells me if the application lost focus that I can test every step or in an alarm?

StepFocusCheck Script
var NOCHANGE; NOCHANGE = 0;
var GOTFOCUS; GOTFOCUS = 1;
var LOSTFOCUS; LOSTFOCUS = 2;

Focus = GetFocus()
if(Focus = LOSTFOCUS)
{
sin_resetDesktopDisplay(); //new dll fn
window_center();
}
else if(Focus = GOTFOCUS)
{
sin_resetGameDisplay(); //new dll fn
window_center();
}

C++
#define NOCHANGE 0
#define GOTFOCUS 1
#define LOSTFOCUS 2

HWND lasthwnd = 0;
gmexport double GetFocus()
{
	HWND hdt = GetDestopWindow();
	if(hdt != lasthwnd)
	{
		HWND hgm = GetActiveWindow();
		if(hdt == hgm) return GOTFOCUS;
		else if(lasthwnd == hgm) return LOSTFOCUS

		lasthwnd = hdt;

	}
	return NOCHANGE;
}

int dh,dw,dcd,dfr;
int gw = 800;
int gh = 600;
int gcd = 32;
int gfr = 60;
gmexport sin_display_init()
{
get desktop settings
set dh,dw,dcd,dfr to desktop settings
original code
}

gmexport sin_display_set()
{
original code
if setting to new values succeded
{
set gh,gw,gcd,gfr to passed argument;
}
}

gmexport sin_resetDesktopDisplay()
{
sin_display_set using desktop values
}

gmexport sin_resetGameDisplay()
{
sin_display_set using game values
}

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#19 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 16 September 2009 - 06:19 PM

Legal bump to announce version 2.0 of the dll with new added features! Check the 1st post for updates! :)
  • 0
GM 8.1 / GM:HTML5 User

#20 Postality

Postality

    GMC Member

  • New Member
  • 244 posts

Posted 16 September 2009 - 06:34 PM

Sin, I love this DLL along with some others of yours.

keep em coming.

(Any chance of you doing a 2D Physics DLL? PhysX (Box2D) was going good but it's not being continued...)
  • 0

#21 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 16 September 2009 - 08:41 PM

No plans at the moment. But I am bound to create something even more advanced sooner or later.

Edited by Sindarin, 20 September 2009 - 08:07 PM.

  • 0
GM 8.1 / GM:HTML5 User

#22 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 20 September 2009 - 07:59 PM

Legal bump to announce total rewrite of the dll with new added features! Check the 1st post for updates! :lol:
  • 0
GM 8.1 / GM:HTML5 User

#23 Yambam

Yambam

    GMC Member

  • GMC Member
  • 647 posts
  • Version:GM8

Posted 25 September 2009 - 06:50 PM

Wow!
Now thats a handy dll! its great!
  • 0

#24 Peeter1000

Peeter1000

    GMC Member

  • New Member
  • 325 posts

Posted 27 September 2009 - 10:15 PM

+ Does not mess up icons and windows,

Well, it does mess up the windows with my graphics card.
  • 0

#25 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 28 September 2009 - 07:24 AM

Yes, it seems to be doing that for some people although I never encountered it on 5 different computers with different specs I tried the DLL on. Care to your supply your specs?

Edited by Sindarin, 28 September 2009 - 07:25 AM.

  • 0
GM 8.1 / GM:HTML5 User

#26 alex21

alex21

    Destroy EvilCow BURP

  • New Member
  • 336 posts

Posted 19 February 2010 - 06:46 PM

No plans at the moment. But I am bound to create something even more advanced sooner or later.

You have to release something advanced now. Because gm 8 is out and I dont use it like many others because it sucks. Well forget about gm8 I am desperate to get something to finnish my noob work. Thank you.

I like red Idians I hope you are a red Indian. Red Indian are my best friends. Especially those are from Greece. Are you from greece?

Edited by alex21, 19 February 2010 - 06:50 PM.

  • 0

Posted Image


#27 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 22 February 2010 - 07:50 PM

You have to release something advanced now. Because gm 8 is out and I dont use it like many others because it sucks.


O_O?


Yes I am from Greece. Red Indian? It seems my avatar confuses people... :/

Zeus forgive my offtopicness...

Edited by Sindarin, 22 February 2010 - 07:52 PM.

  • 0
GM 8.1 / GM:HTML5 User

#28 DJ-Habana

DJ-Habana

    GMC Member

  • New Member
  • 47 posts

Posted 17 July 2010 - 08:39 PM

I am using windows 7 and this dll doesn't work anymore I get this error


___________________________________________
ERROR in
action number 1
of Create Event
for object display_control:

Error defining an external function.
  • 0

#29 57E

57E

    GMC Member

  • GMC Member
  • 64 posts
  • Version:GM:Studio

Posted 29 October 2010 - 08:44 AM

I am using windows 7 and this dll doesn't work anymore I get this error


___________________________________________
ERROR in
action number 1
of Create Event
for object display_control:

Error defining an external function.

Same problem here, Windows 7 64bit.
  • 0

#30 Madidus

Madidus

    GMC Member

  • New Member
  • 43 posts

Posted 26 January 2011 - 06:56 PM

Yeah, got the same error on 7 64-bit. Worked a week ago, now it does not.
  • 0

#31 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 26 January 2011 - 07:40 PM

I am not using 64 bit so I can't really test it out myself. I made this DLL some time ago when I was still new to C++ and I now can spot some newb mistakes in the source.
For one, screen selection doesn't seem to work properly. Tested using my external HD TV.
I'll try to write a revision on this DLL when I get the time.

Worked a week ago, now it does not.


This is strange though. However I read in a forum the functions I use behave somehow buggy in Windows 7 64-bit. I'll try to figure it out.
  • 0
GM 8.1 / GM:HTML5 User

#32 Madidus

Madidus

    GMC Member

  • New Member
  • 43 posts

Posted 27 January 2011 - 05:03 PM

Worked a week ago, now it does not.


This is strange though. However I read in a forum the functions I use behave somehow buggy in Windows 7 64-bit. I'll try to figure it out.


Forgot to mention that I re-installed my system (because I wanted to install on striped disks.) Bu it's still weird, because I had W7 64-bit on my last install too.
  • 0

#33 Big J

Big J

    GMC Member

  • GMC Member
  • 2853 posts
  • Version:GM8.1

Posted 05 April 2011 - 11:14 AM

This DLL is great! :D Only one problem: The resolution reset done "automatically" on game exit messes up my windows, but if do the reset myself in the code for example in the Game End event, it doesn't mess up the windows.

I basically just do this on startup:
global.NativeWidth = sin_display_get_width(0);
global.NativeHeight = sin_display_get_height(0);
global.NativeDepth = sin_display_get_colordepth(0);
global.NativeFrequency = sin_display_get_frequency(0);
Then I use those values for resetting the resolution back to default in my code, and ta-da! No messed-up windows. :D

Good job on the DLL anyway. :)

Now if Game Maker could get a fix for the primary drawing surface not matching the window size I would be really happy! :D (FRAPS would then work correctly on windowed games) As it is now, if my desktop resolution is 1024x768 and I play a 640x480 windowed Game Maker game, it records as 1024x768 with the actual 640x480 video at the top left... terrible. :P

Yes, I made a bug report just now. ;)

Edited by Big J, 06 April 2011 - 03:03 AM.

  • 0

Get your GM 8.1 Anti-Aliasing here!

2712265.png

http://www.youtube.com/Sporkinator


#34 Ggd07

Ggd07

    GMC Member

  • GMC Member
  • 133 posts
  • Version:GM:Studio

Posted 17 July 2011 - 11:30 PM

It's the opposite with me. I've been using it from 5-6 months on my project and it worked a lot, but now that my project got complicated I tried moving to GM 8.1 because of the new improvements, and it doesn't work there.

It changes the resolution and either goes to black screen (and app is not responding anymore), or either doesn't stretch the screen at all.
In GM 8.0, after changing the resolution once, it starts to bug out a lot. On Windows 7 I could change some resolutions, but on XP after one change it goes to black screen and not responding every time..

:[
  • 0

#35 57E

57E

    GMC Member

  • GMC Member
  • 64 posts
  • Version:GM:Studio

Posted 19 August 2011 - 05:23 AM

After the gm81 patches that were relased this summer I no longer have the "Error defining an external function" error with Sin Display on Windows 7 64bit and everything seems to be working normaly, at least as far as I can tell. :smile:
  • 0

#36 Tha_14

Tha_14

    GMC Member

  • New Member
  • 174 posts
  • Version:GM8.1

Posted 19 August 2011 - 10:39 AM

In GM8 when I use it it return -2 and the screen resolution is changed successful.Why does it return -2?
  • 0

Posted Image


#37 Tha_14

Tha_14

    GMC Member

  • New Member
  • 174 posts
  • Version:GM8.1

Posted 20 August 2011 - 01:09 PM

In GM8 when I use it it return -2 and the screen resolution is changed successful.Why does it return -2?

Sry,I read the scripts again.
  • 0

Posted Image


#38 rinkuhero

rinkuhero

    Paul Eres

  • GMC Member
  • 1919 posts
  • Version:GM:Studio

Posted 11 October 2011 - 02:17 AM

i used it on vista, in game maker 7, and also get the "error defining an external function" error every time i try to use it

perhaps you could make this an extension instead?

does anyone know of any alternative dll which does the same thing this one does, since this is exactly what i've been looking for. or even just an older version of this dll that doesn't give the error defining external function bug?
  • 0

#39 esco

esco

    GMC Member

  • GMC Member
  • 306 posts
  • Version:GM:Studio

Posted 23 November 2011 - 07:09 PM

EDIT: OOPS WRONG THREAD. :confused:

Edited by esco, 24 November 2011 - 06:25 PM.

  • 0

Esco... the original New Yorican and creator of the Castlevania: SOTN Hacked Project!
THIS PROJECT HAS BEEN MOVED OVER TO UNITY3D AND I NO LONGER POST HERE! MANY THANKS TO EVERYONE WHO HELPED ME ON THESE FORUMS, YOU GUYS ARE AWESOME! :)
This engine once completed will be released to the community and will hopefully be of great use to a lot of you platform game creators out there!
Link to the Project: http://sotnhacked.wordpress.com

Link to the DeviantArt Page: http://esco1979.deviantart.com/


#40 Big J

Big J

    GMC Member

  • GMC Member
  • 2853 posts
  • Version:GM8.1

Posted 30 April 2012 - 10:54 AM

Ah darn. Windows 7 strikes again. All my games that use this DLL are now full of error. :lol:
  • 0

Get your GM 8.1 Anti-Aliasing here!

2712265.png

http://www.youtube.com/Sporkinator


#41 CraythurONE

CraythurONE

    GMC Member

  • GMC Member
  • 17 posts
  • Version:Unknown

Posted 07 May 2012 - 03:43 AM

Hi, where can I find this DLL or extension? This is exactly what Im looking for. Thanks in advance.
  • 0

#42 d2king10

d2king10

    Pixel Freak

  • GMC Member
  • 753 posts

Posted 07 May 2012 - 10:35 AM

Does anyone have a link to this .dll somewhere? Thanks.
  • 0

#43 Big J

Big J

    GMC Member

  • GMC Member
  • 2853 posts
  • Version:GM8.1

Posted 07 May 2012 - 12:01 PM

This DLL needs a replacement that works on Windows 7. :(
  • 0

Get your GM 8.1 Anti-Aliasing here!

2712265.png

http://www.youtube.com/Sporkinator


#44 Razon

Razon

    GMC Member

  • GMC Member
  • 268 posts
  • Version:GM:Studio

Posted 10 May 2012 - 02:15 AM

Here's a mirror for the DLL version.

http://www.mediafire...8ps74hti9pnl0dl
  • 1

#45 Razon

Razon

    GMC Member

  • GMC Member
  • 268 posts
  • Version:GM:Studio

Posted 10 May 2012 - 02:16 AM

Double posted by accident, the one in my prior post is a newer version of the same DLL I believe.

http://www.mediafire...mwn1axj8kx2zeuu

Edited by Razon, 31 May 2012 - 11:07 AM.

  • 1

#46 CraythurONE

CraythurONE

    GMC Member

  • GMC Member
  • 17 posts
  • Version:Unknown

Posted 13 May 2012 - 04:50 AM

http://www.mediafire.com/?mwn1axj8kx2zeuu


Awesome Razon!, Thanks a lot! The dll works like a charm with GameMaker 8.0 Pro, the big problem now is that its not working on GameMaker 8.1 (Version my games are currently working on).

Any idea how to fix this?

Already try it on GameMaker 8.1 on Windows 7 or Windows XP and still wont work. It is definitely something related with 8.1 and not Windows version.
  • 0

#47 Big J

Big J

    GMC Member

  • GMC Member
  • 2853 posts
  • Version:GM8.1

Posted 22 May 2012 - 08:05 AM

Strange, suddenly this DLL is working fine for me on Windows 7 64 bit... it didn't when I first got this computer.
  • 0

Get your GM 8.1 Anti-Aliasing here!

2712265.png

http://www.youtube.com/Sporkinator